Blocking Access To Full Memberlist MOD
This is a MODification that allows for registered users and other groups to be able to view the viewonline page and member profiles, but not the whole memberlist.
Please backup your files before continuing, and if you decide to make these changes, you proceed at your own risk.
Please backup your files before continuing, and if you decide to make these changes, you proceed at your own risk.
Support Topic on .com: https://www.phpbb.com/community/viewtopic.php?t=2635161[Dimetrodon] wrote:Sun Jan 29, 2023 5:54 pm 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:
Then add the following after it:Code: Select all
// Check our mode... if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'contactadmin', 'searchuser', 'team', 'livesearch'))) { trigger_error('NO_MODE'); }
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.Code: Select all
if (in_array($mode, array('','group'))) { if ($user->data['group_id'] != 5) { trigger_error('NO_VIEW_USERS'); } }
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.