MyBB Community Forums

Full Version: How to Hide Administrator from the MemberList?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using MyBB 1.8.20 with default theme, I have tried this method to remove main administrator (uid1) account from the memberlist but this method doesn't seems to work.

How can I hide the main Admin Account from the MemberList?
Did you try to look the member page with another account than the admin ?
if($user['usergroup'] == 4 && $mybb->user['uid'] != 1)
the $mybb->user['uid'] != 1 says to not hide the administrators when the user with id 1 (main admin) is looking the page.
(2019-04-04, 02:09 PM)Crazycat Wrote: [ -> ]Did you try to look the member page with another account than the admin ?
if($user['usergroup'] == 4 && $mybb->user['uid'] != 1)
the $mybb->user['uid'] != 1 says to not hide the administrators when the user with id 1 (main admin) is looking the page.

The main Administrator account is showing in all user-groups even Guests can see the admin account from memberlist page. i want to hide this from all usergroups except uid1 admin account. thanks for your reply.
I did the test, adding the following line in memberlist.php @line 365

if($user['usergroup'] == 4 && $mybb->user['uid'] != 1) { continue; }

And it works perfectly, only the main admin (user with uid 1) has administrators listed in member list.

Note that the administrators *must have* this group set as primary group. This is not working for additionnal groups and still less with the display group.

Note bis : remember that you're modifying the core of MyBB, so next upgrade will erase your modification.  Peharps that simply uncheck "Yes, show users of this group on the member list" in  Home » User Groups » Edit User Group will be ok for you, but with that even admins won't see the group members in the memberlist.
(2019-04-05, 07:43 AM)Crazycat Wrote: [ -> ]I did the test, adding the following line in memberlist.php @line 365

if($user['usergroup'] == 4 && $mybb->user['uid'] != 1) { continue; }

And it works perfectly, only the main admin (user with uid 1) has administrators listed in member list.

Note that the administrators *must have* this group set as primary group. This is not working for additionnal groups and still less with the display group.

Note bis : remember that you're modifying the core of MyBB, so next upgrade will erase your modification.  Peharps that simply uncheck "Yes, show users of this group on the member list" in  Home » User Groups » Edit User Group will be ok for you, but with that even admins won't see the group members in the memberlist.

Many Thanks for your reply on this issue, as you said above I just unchecked Yes, show users of this group on the member list and the problem is solved.