No announcement yet.

[RELEASE] Hide Admin(s) on Member List Hack

  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE] Hide Admin(s) on Member List Hack

    This is an update to a 1.1.3 hack that I did a while back.

    I added a bit of code to memberlist.php to hide members of the Admin user group (group 6). I toyed with the idea of hiding users based on the invisible tag, but decided that the two functions are different.

    Save the attached file, hideadmin.php, in your admin directory. Run it from your web browser to add the option to your Control Panel Options page. Delete the file, hideadmin.php. Then go into your Control Panel, into the Change Options section, and save the options (the memberlisthideadmin variable will be set to "Yes").

    At line 34 of memberlist.php you will find:
    setting up the WHERE clause. After that line but before the if statement add:
    // exclude the Admin group?
      if ($memberlisthideadmin==1) {
          $condition.=" AND usergroupid!=6";
    This keeps the user name of your admin account(s) out of the public eye, especially if you use "Admin" which appears first!
    Peter E. Humphries
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.