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

Check all User Groups, not just Primary

Discussion in 'Styling and Customization Questions' started by Footie, Jul 10, 2012.

  1. Footie

    Footie Member

    I'm making a second member list that is for admin people tracking purposes (and only they can see it), and it will have the group name followed by everyone who is in that group. The thing is, people are in multiple user groups, but they are only showing up in their Primary group when I'd like them to show up in ALL of the groups they're a part of.

    This is the code for what one of the groups looks like:
    HTML:
        <h2>Administrator</h2>
            </div>
        <ol class="section memberList">
            <xen:foreach loop="$users" value="$user">
                <xen:if is="{$user.user_group_id} == 4">
                <xen:include template="member_list_item">
                </xen:include>
              </xen:if>
            </xen:foreach>
        </ol>
    I suspect it has something to do with the variable $user.user_group_id that it only checks the primary group instead of all of the groups they're in. Is there some bit of code I can add in to have it poll all of their groups?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page