Limit user access to content based on custom user profile feilds

Hi - I am wondering if there is a way to link access to categories of post based on contents of custom user profile fields?

I have a small forum for architects, intended mostly to support them with free and frank discussion about issues they face - which discussion can include unguarded comments that are not intended for the public.
I also have users who are members of the public who are interested in architecture - and I think it is important for architects and the public to be able to interact with each other as well (in a more guarded way).

The custom user profiles of architect members mostly all contain data confirming this from a drop down multi select list that was completed on signup

If I have two main topic categories ‘Public’ and ‘Private’ , is there a sensible way to restrict viewing access to the ‘Private’ category to architect members only, based on contents of that custom user profile field? (or perhaps even better, with a manual administrator only tick box, clicked once admin is satisfied the user is actually an architect)

Just create a group that allows users to request to join it and/or add members to that group when you have approved them.

If you trust that only people who know some secret will enter whatever value in the custom field you could make a plugin to add them automatically, but unless you’re adding tens of users a day, it’s probably not worth it.

3 Likes