Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
1.6k views
in Q2A Core by
How do you hide certain users from the public users list? I'd like to hide admins & moderators whose sole purpose is to admin/moderate as opposed to participating for points, etc. Thought it might be a safeguard against unwanted messages/abuse to admins/moderators. Thanks!
Q2A version: 1.5
by
How about this in version 1.7?

4 Answers

+1 vote
by

You could do this via an advanced theme which overrides the ranking(...) function, if $this->template=='users' and removes those particular users from the list before calling through to the default ranking(...) function.

by
I dont get it....please explain a bit more....I want to hide the admin's username from the public user list....hows it possible....??? Which files needs to be changed?
+1 vote
by
Hi Experts

is there any update?
+1 vote
by

How mentioned by the author above, the users list is managed by the function ranking() that you can find in the file qa-theme-base.php inside the directory qa-include (on line 1310 in version 1.7.5). 

You can hide the admin simply jumping its item in the loop foreach ($ranking['items'] as $item) which is in the else clause on line 1324, by adding the following line:

if ($item['raw']['handle'] == 'admin-username') continue;

where "admin-username" is the username you assigned to the super-admin. Please note that:

  1. this will just exclude the nickname from the public list of users, but the admin dashboard (where it is written it is the super-admin) will still be visible, so other users and visitors should not know this username. This mean that you should use it only for admin purposes and not to answer to users' questions, which makes sense: better not to use the root account for normal usage of the system.
  2. Before to make any change directly on a source file, always make a backup copy (i.e adding BAK to the file name) so you can restore the original version in case of any mistake.

0 votes
by

There is a very simple yet effective solution for it against spammers..
you can just go to qa-include/lang/qa-lang-users.php  

search for line 'level_admin' => 'Administrator',

Most probably at line no 73

Change administrator to another name like .. moderator or registered user

Then it will change the text administrator in all places to just moderator .

...