Notifications
Clear all

wpForo 1.x.x [Solved] Hide specific users from Members page

9 Posts
3 Users
5 Likes
739 Views
Posts: 10
Topic starter
(@mac26)
Active Member
Joined: 2 years ago

I've searched on here for how to hide Admin users from the Members page but all solutions appear to be to hide the whole usergroup and not individual accounts.

 

Is there a way to hide individual users from the Members page? As I want some of my admin accounts visible but not others.

Topic Tags
8 Replies
4 Replies
Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1247
Posted by: @mac26

Is there a way to hide individual users from the Members page? As I want some of my admin accounts visible but not others.

if this is important for you

you can mudify the members.php, so that the User-ID is integrated
after that you can hide any User-ID via CSS display:none;

(@mac26)
Joined: 2 years ago

Active Member
Posts: 10

@tutrix Thanks Tutrix.  What do you mean by the User-ID being integrated?

 

Hiding them isn't essential but the members are is messy if they aren't.  I have a site account for anything official relating to site activity, my own account for taking part as a member while still admin, these I'm happy to have displayed but then there is a test account with subscriber privileges, a support account for 3rd parties when dealing with technical issues and a site support account for moderation.  The last 3 do not need to be shown as they don't class as participating members in the community as such.

 

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1247

@mac26 

open the members.php (wpforo > wpf-themes > classic > members.php)

search for

<tr<?php echo ( $bg ? ' style="background:#F7F7F7"' : '' ) ?>>

and replace with

<tr<?php echo ( $bg ? ' style="background:#F7F7F7"' : '' ) ?> class="userid-<?php echo wpforo_bigintval($member['userid']) ?>">

the best way to do this is = Theme Customization

now you can hide users via CSS

example User-Id "1"

#wpforo #wpforo-wrap .wpforo-members-wrap .wpforo-members-content tr.userid-1 {
display: none;
}
(@mac26)
Joined: 2 years ago

Active Member
Posts: 10

@tutrix Awesome, thanks Tutrix!!

Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

@mac26,

wpForo doesn't have an option to hide current user, only by usergroup.

1 Reply
(@mac26)
Joined: 2 years ago

Active Member
Posts: 10

@chris Thanks Chris, I was also looking through the user settings as I would have at least thought that users would have the option to hide their own account from being searched in the members list.

 

On second thoughts, if users can only be removed by whole user group it would probably be easier to create another admin/support type user group, move the accounts to it and block that.

Posts: 10
Topic starter
(@mac26)
Active Member
Joined: 2 years ago

I just wanted to thank @tutrix and @chris for the replies.

 

I've kept Tutrixes solution in my back pocket for now as I would like to keep this manageable through the dashboard where possible so that there is less custom CSS floating around.  I've not even opened my site to members yet and the CSS snippets are already building up!! 😀 

I've just got this working by creating two new user roles.  I have the free Members plugin installed so I went to Dashboard>Members, cloned my Administrator role and renamed it, then also cloned my Subscriber role and renamed it.  I then moved the users that I wanted hidden into the new Subscriber/Administrator roles respectively by editing their profile in Dashboard>Users>All Users.

Finally I went over to Dashboard>Forum>Usergroups and scrolled to the bottom of the page where you should see the new user roles with a button to the right that says "Add usergroup to synch".  Click it and create your new forum usergroups with the same permissions as your standard forum Administrator/Subscriber user groups BUT leave the box unchecked next to "Display on Members List".

Hit save and then on the Dashboard>Forums>Usergroups page hit synchronise and you should see your member count update for each usergroup.  Now you can easily add and remove admin/support user accounts into these groups for testing without them showing up in your members lists.

Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

Thank you @tutrix & @mac26, for the information, this will be helpful for our user's.