Plug-in to hide administrator/s from Member List
#1
Recently I've found the need/want to remove the administrators from the Member List for security reasons. My reasoning lies with the inability to see what the admin user names are might help prevent a potential vulnerability. While this is a small addition, I think any addition in security is all about stacking the cards in our favor. My personal choice as admin has been to only use this account for the Admin CP and nothing else. There is really no reason to have the user name visible on this list, at least in my case.

I know that the admin can make themselves invisible while logged in, and I also see that there is a plug-in to remove the admin from the "Forum Team" section, but the admin showing up on the Member List renders this plug-in basically useless. I have no programming knowledge, but enough observational keenness to assume that this plug-in would be an easy one. Smile Anyone want to take a shot?

Matt
Reply
#2
Agreed Smile Maybe even get to select which members can be hidden :O
Reply
#3
Agreed, This would be a good idea.
<snip>
Reply
#4
Wow. I can't believe that this isn't a larger topic of interest. We even have a support team member in favor of this! Smile

Well, can someone at least point me in the right direction where I might take a stab at it? Where would I start?
Reply
#5
Open memberlist.php and find;

PHP Code:
$plugins->run_hooks("memberlist_user"); 

Add the following code just underneath the above code;

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

This will hide all admins from the memberlist, but First admin (who has the first uid) will be able to see the admins in the memberlist.
Reply
#6
Oh wow - I just went out to check on this thread and add to it since I hadn't heard anything, and I had no idea someone had responded with a solution! Thanks Yaldaram!

The addition of this code works as I wished. However just to let you know, the username I have setup as the first user still cannot see the admin which is completely fine. I don't need to see myself when I'm logged in Smile

Thank you!
Reply
#7
Thanks.
Reply
#8
(12-11-2010, 05:57 AM)Yaldaram Wrote:  
PHP Code:
if($user['usergroup'] == && $mybb->user['uid'] != 1)
        {
            continue;
        } 

How do I edit this code to include banned members?

Hide admins and banned members...

Thanks!
Reply
#9
http://mybbsource.com/thread-1373.html
Should work with 1.6 (compatibility has been changed already)
Reply
#10
(08-25-2011, 06:57 PM)x-Treme Wrote:  http://mybbsource.com/thread-1373.html
Should work with 1.6 (compatibility has been changed already)

Not seeing a free plugin download there...

Would rather simply edit the code above.

Thanks anyways!


PHP Code:
if($user['usergroup'] == || $user['uid'] == "1" && $mybb->user['uid'] != 1)
        {
            continue;
        } 

This code does what I wanted it to do...

Hides banned members and super admin from the members list. I do not have any banned members yet so I can't verify that it actually hides banned members. I'm assuming it does.

It works but can someone verify that I edited this code correctly?

I also understand that I will need to re-apply this when mybb gets updated.

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)