Ludachris Well-known member Jul 15, 2014 #1 Can someone post the correct conditional code to check if the person browsing is a guest OR is part of usergroup 23? I don't think what I have is correct.
Can someone post the correct conditional code to check if the person browsing is a guest OR is part of usergroup 23? I don't think what I have is correct.
P Paul B XenForo moderator Staff member Jul 15, 2014 #2 You can combine the guest and user group statements posted here: http://xenforo.com/community/resources/conditional-statements.1604/ Upvote 0 Downvote
You can combine the guest and user group statements posted here: http://xenforo.com/community/resources/conditional-statements.1604/
Ludachris Well-known member Jul 15, 2014 #3 So this should work: Code: <xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $visitor, x}"> And to make sure a member is not part of several usergroups, I'd have to do this: Code: <xen:if is="!{xen:helper ismemberof, $visitor, 23} AND !{xen:helper ismemberof, $visitor, 24} AND...> Upvote 0 Downvote
So this should work: Code: <xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $visitor, x}"> And to make sure a member is not part of several usergroups, I'd have to do this: Code: <xen:if is="!{xen:helper ismemberof, $visitor, 23} AND !{xen:helper ismemberof, $visitor, 24} AND...>
P Paul B XenForo moderator Staff member Jul 15, 2014 #4 <xen:if is="!{$visitor.user_id} OR {xen:helper ismemberof, $visitor, 23"> Upvote 0 Downvote
Ludachris Well-known member Jul 15, 2014 #5 Is there a way to check if a member belongs to ONLY a specific usergroup and no others? Upvote 0 Downvote