• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom User Field (Specific Group)

Stimo

Active member
#1
Hi guys, is there a way to allow it so only members of a certain usergroup can access a specific custom user field?
 

Jake Bunce

XenForo moderator
Staff member
#4
That code example checks admin status. But you can do a group check like this:

Code:
											<xen:if is="{$field.field_id} != 'field_id of restricted field' OR {xen:helper ismemberof, $visitor, 4}">
												<xen:include template="custom_field_view" />
											</xen:if>
 

Stimo

Active member
#5
That code example checks admin status. But you can do a group check like this:

Code:
<xen:if is="{$field.field_id} != 'field_id of restricted field' OR {xen:helper ismemberof, $visitor, 4}">
<xen:include template="custom_field_view" />
</xen:if>
Just wondering.. does this stop the group from seeing the custom field when viewing a users profile? As that is not what I want.. I want it so that only a specific group can choose an option in the custom field but i want everyone to see it when viewing users profile
 

Jake Bunce

XenForo moderator
Staff member
#6