Current time: 04-24-2014, 04:45 PM Hello There, Guest! (LoginRegister)


Post Reply 
Plug-in to hide administrator/s from Member List
06-13-2010, 03:01 AM
Post: #1
Plug-in to hide administrator/s from Member List
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
Find all posts by this user
Quote this message in a reply
06-13-2010, 03:07 AM
Post: #2
RE: Plug-in to hide administrator/s from Member List
Agreed Smile Maybe even get to select which members can be hidden :O

MyBB Software Assurance Team
OpenNotion - Open-Source Idea Collaboration Software
Managed and Unmanaged Dedicated Servers and VPS | 99.9% Uptime Guarantee • 7 Day Money Back Guarantee
Find out more!
Find all posts by this user
Quote this message in a reply
06-13-2010, 03:17 AM
Post: #3
RE: Plug-in to hide administrator/s from Member List
Agreed, This would be a good idea.

<snip>
Find all posts by this user
Quote this message in a reply
12-11-2010, 04:41 AM
Post: #4
RE: Plug-in to hide administrator/s from Member List
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?
Find all posts by this user
Quote this message in a reply
12-11-2010, 05:57 AM
Post: #5
RE: Plug-in to hide administrator/s from Member List
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.

[Image: 16mJ9bI]
MyBBsmsAPP | MyStatus | ProProfile
Visit this user's website Find all posts by this user
Quote this message in a reply
04-29-2011, 07:45 PM
Post: #6
RE: Plug-in to hide administrator/s from Member List
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!
Find all posts by this user
Quote this message in a reply
04-30-2011, 01:52 AM
Post: #7
RE: Plug-in to hide administrator/s from Member List
Thanks.

[Image: 16mJ9bI]
MyBBsmsAPP | MyStatus | ProProfile
Visit this user's website Find all posts by this user
Quote this message in a reply
08-25-2011, 05:31 PM (This post was last modified: 08-25-2011 05:37 PM by oem.)
Post: #8
RE: Plug-in to hide administrator/s from Member List
(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!
Find all posts by this user
Quote this message in a reply
08-25-2011, 06:57 PM
Post: #9
RE: Plug-in to hide administrator/s from Member List
http://mybbsource.com/thread-1373.html
Should work with 1.6 (compatibility has been changed already)

My Test Forum
Visit this user's website Find all posts by this user
Quote this message in a reply
08-25-2011, 08:08 PM (This post was last modified: 08-25-2011 08:55 PM by oem.)
Post: #10
RE: Plug-in to hide administrator/s from Member List
(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!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication