PDA

View Full Version : How To Hide (cannot edit) Profile Fields From Specific Groups With Conditionals


gbml4u
04-13-2010, 10:53 PM
How to use the vB4?

Fields From Specific Groups With Conditionals

This is used for vB3.x

Admin CP -> User Profile Fields -> User Profile Field Manager

For example, a profile field that says field2 has a profilefieldid of 2, so you would replace A, B, C with 2 if that is the only profile field you want to restrict.
Specify Which Groups CANNOT Edit

Simply add a ! to the previous code to reverse the logic on the group checking:


<if condition="THIS_SCRIPT != 'profile' OR (!in_array($profilefield[profilefieldid], array(A, B, C)) OR !is_member_of($bbuserinfo, X, Y, Z))">

...
</if>

Where X, Y, Z is a comma list of usergroupids that are NOT allowed to edit profilefieldids A, B, C.

Thanks for the help