Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How can I hide "super admin" from user lists

+3 votes
880 views
asked Sep 24, 2012 in Q2A Core by anonymous
How can I hide "super admin" from user lists?

2 Answers

–1 vote
answered Sep 24, 2012 by deividman
Do you want to see only the "super admin" user list page?
commented Sep 24, 2012 by susuario
No, I want to hide "super admin" from the user list. No one can see the super admin profile
+5 votes
answered Sep 27, 2012 by deividman
open "qa-db-selects.php" go to line 1254.

line 1254: 'columns' => array('^users.userid' , 'handle', 'points', 'flags', '^users.email', 'avatarblobid', 'avatarwidth',

add this: '^users.level',

new 1254 line: 'columns' => array('^users.userid', '^users.level', 'handle', 'points', 'flags', '^users.email', 'avatarblobid', 'avatarwidth',

--------------------

ok. now:

open "qa-page-users.php" and find  "foreach ($users as $userid => $user)"

press enter..

add this: if($user['level']!=120){

find: ");}"

press enter..

add this: }

 

good luck.
commented Apr 13, 2015 by likewater
edited Apr 17, 2015 by likewater
How to hide "super admin*" from user list on version 1.7? (*otherwise you can change the name of "super admin" to "admin" or others and not hide it)

This is how:

First, edit "selects.php" (question2answer\qa-include\db\selects.php):
https://drive.google.com/file/d/0B4bwwUArsLqjQURJb2w2TWhOQk0/view?usp=sharing

Second, edit "users.php" (question2answer\qa-include\pages\users.php):
https://drive.google.com/file/d/0B4bwwUArsLqjX0RobzdzWHdlekE/view?usp=sharing


How to change "super administrator" name:
Edit "qa-lang-users.php" (question2answer\qa-include\lang\qa-lang-users.php)
https://drive.google.com/file/d/0B4bwwUArsLqjd0hzelZIb0RnMXc/view?usp=sharing

Replace 'Super Administrator' for another name.
commented Apr 16, 2015 by sama55
Good. I think that your changes of selects.php should be reflected in the Q2A core. In addition, option for excluding administrator from user list would be required.
Reason: Administrator should not be applied to the user's ranking.
...