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

[rc3] user in primary or secondary usergroup 5?

Discussion in 'XenForo Development Discussions' started by Floris, Feb 26, 2011.

  1. Floris

    Floris Guest

    	debug: (custom usergroup 5 = premium on xenfans)
    	<xen:if is="{xen:helper ismemberof, $user, $userGroupId} == 5">
    	<xen:else />
    	not premium
    I simply want to test if the user browsing a page is at all in the Premium usergroup, or not.
    Users can be in various usergroups, primary or secondary, so i need to test if the user is in primary: Premium or perhaps has it as additional usergroup: Primary. usergroupid = 5.

    The above code is what I thought should do the trick, but no matter which user, admin, registered, or premium, primary or secondary, the output is always: debug: premium

    <xen:if is="{xen:helper ismemberof, $visitor, $userGroupId} == 5">

    also doesn't seem to work.

    I know I can use this to check, but that's only covering Primary usergroup id, if the user is 'registered' with secondary 'primary', then it shows as not-premium.

    <xen:if is="{$visitor.user_group_id} == 5">..
  2. Floris

    Floris Guest

  3. Floris

    Floris Guest

    yep, that was it. wfew.. moving on.

    tnx jake!

Share This Page