Allow registered users to view member profile

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
TheButcher2
Registered User
Posts: 973
Joined: Tue May 13, 2014 11:38 pm
Contact:

Allow registered users to view member profile

Post by TheButcher2 »

Hi guys,

Is it possible to allow registered users to view member profile but not look up the whole member list, I don't want to get into a situation where they can look up the whole memebrlist and spam them, but I want them to be able to click on a member and see their profile such as skype or icq contacts.
User avatar
MarkDHamill
Registered User
Posts: 4772
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Allow registered users to view member profile

Post by MarkDHamill »

I don't think this is built into phpBB. However, you could edit the template navbar_header.html and remove the markup for the member list. This hides it but someone who knows the right URL arguments could still bring it up.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
[Dimetrodon]
Registered User
Posts: 260
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Allow registered users to view member profile

Post by [Dimetrodon] »

Hi.

You're going to have to edit memberlist.php in your board's root directory. Make sure you back the file up first before making any changes,
then find:

Code: Select all

// Check our mode...
if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'contactadmin', 'searchuser', 'team', 'livesearch')))
{
	trigger_error('NO_MODE');
}
Then add the following after it:

Code: Select all

if (in_array($mode, array('','group')))
{
	if ($user->data['group_id'] != 5)
	{
		trigger_error('NO_VIEW_USERS');
	}
}
For any user who is not an Administrator (not in the group administrators), they will receive an error message when they try to view the full memberlist or group memberships.

Of course, to allow users to view profiles, set "can view memberlist, online list, and profiles" to "yes" under the permission settings for registered users. Due to this change, it will only give them the ability to view profiles though.

Administrators and only administrators will be unaffected.
🇺🇦 Stand with Ukraine 🇺🇦
"Life is rarely a choice between good and bad, but bad and worse." - Steve Shahbazian
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
User avatar
TheButcher2
Registered User
Posts: 973
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: Allow registered users to view member profile

Post by TheButcher2 »

Works like charm thanks a lot [Dimetrodon]

Peace
Post Reply

Return to “[3.3.x] Support Forum”