Hide some members from the member list

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
robdocmagic
Registered User
Posts: 41
Joined: Sat Jan 14, 2006 4:07 pm

Hide some members from the member list

Post by robdocmagic »

Hi,

I have 15 test users that I login with to test out certain features.

test.1
test.2

...

test.15

I would like to hide them from the member list. It appears that the member list does not show inactive users -- so I was looking for the code where I could append so that any user that starts with "test" would be ignored from the main member list (but still show up when I do listings from the ACP).

Thanks!!

-Rob
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26874
Joined: Fri Aug 29, 2008 9:49 am

Re: Hide some members from the member list

Post by Mick »

You could make a new group for your test accounts and put your test accounts in there, and I presume you would have to remove them from their existing groups? Then hide that group from normal users.

I realise this isn't EXACTLY what you wanted but it's a start.

There is a discussion about this here: http://www.phpbb.com/community/viewtopi ... &p=6124365
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: Hide some members from the member list

Post by mtrs »

robdocmagic wrote:I have 15 test users that I login with to test out certain features.
..
I would like to hide them from the member list.
You can try this way
Open
memberlist.php

Find

Code: Select all

            $user_list[] = (int) $row['user_id']; 
Replace with

Code: Select all

            if (!in_array($row['user_id'], array(55,56,57)))
            {
                $user_list[] = (int) $row['user_id'];
            } 
Another way
Open
memberlist.php
Find

Code: Select all

				$sql_from
			WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
Add after

Code: Select all

						AND u.user_id NOT IN (55,56,57,63,60)
I abandoned all of my mods.
JohnH
Registered User
Posts: 16
Joined: Wed Mar 18, 2009 5:19 am

Re: Hide some members from the member list

Post by JohnH »

Thanks for this tip!

I used the second method because if you make the modification to both occurrences of

Code: Select all

                $sql_from
             WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
you can exclude the test accounts from the overall user count as well.
Vaneska
Registered User
Posts: 4
Joined: Mon Mar 30, 2009 8:50 pm

Re: Hide some members from the member list

Post by Vaneska »

Hi,

Is it possible to hide the Group ID whit the second method?

Return to “[3.0.x] Support Forum”