Yoshi910 Member Jun 13, 2012 #1 PHP: <xen:if is="{$user.user_group_id} == 2">Text</xen:if> For some reason, that will not work. A member in the user group of registered cannot view that.
PHP: <xen:if is="{$user.user_group_id} == 2">Text</xen:if> For some reason, that will not work. A member in the user group of registered cannot view that.
Jake Bunce Well-known member Jun 13, 2012 #2 What template? You might want $visitor instead of $user. $visitor is the currently logged in user. You also need to use the ismemberof helper if you want to check secondary groups as well as primary. See this thread: http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/ Upvote 0 Downvote
What template? You might want $visitor instead of $user. $visitor is the currently logged in user. You also need to use the ismemberof helper if you want to check secondary groups as well as primary. See this thread: http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/
Yoshi910 Member Jun 13, 2012 #3 Jake Bunce said: What template? You might want $visitor instead of $user. $visitor is the currently logged in user. You also need to use the ismemberof helper if you want to check secondary groups as well as primary. See this thread: http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/ Click to expand... Thank you. Works fine now Upvote 0 Downvote
Jake Bunce said: What template? You might want $visitor instead of $user. $visitor is the currently logged in user. You also need to use the ismemberof helper if you want to check secondary groups as well as primary. See this thread: http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/ Click to expand... Thank you. Works fine now