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

Possible to select usergroups to display in member list?

Discussion in 'XenForo Questions and Support' started by TheBigK, Nov 10, 2012.

  1. TheBigK

    TheBigK Well-Known Member

    I hope I'm not overlooking the things, but I'd want only select members to show up in our member lists. Is there a way to show only selected user-groups in the member list? Our member list is sorted alphabetically and users with ZERO post counts show up on the top - which makes kind of a not-good impression.
  2. Syndol

    Syndol Guest

    You will have to edit the ControllerPublic/Member.php file for this.
    On line 48 you will find:
    $criteria = array(
    'user_state' => 'valid',
    'is_banned' => 0
    Replace it with:
    $criteria = array(
    'user_state' => 'valid',
    'is_banned' => 0,
    'secondary_group_ids' => array(3,7)
    That will only grab users from those secondary groups.
    If you want to grab primary groups simply use user_group_id instead.
    Jake Bunce likes this.
  3. TheBigK

    TheBigK Well-Known Member

    That's a cool way. Upgrade will wipe out those changes, though, right? I hope XF upgrade is coming soon :D.

    For the time being, I'll update the code.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  5. TheBigK

    TheBigK Well-Known Member

  6. Morgain

    Morgain Well-Known Member

    MOZ has made a Memberlist Manager and I have been talking to him about adding this kind of ability. He cannot finish it right now as he has exams but he's doing it for me at the end of the month.

    In admin I select the usergroups to display on the standard memberlist.
    As admin I can also Search on frontend to see my selection of usergroups.

Share This Page