Code: Select all
// Check our mode...
// Original line: if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'contactadmin', 'searchuser', 'team', 'livesearch')))
if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'searchuser', 'livesearch')))
{
trigger_error('NO_MODE');
}
Code: Select all
// Custom restrictions. Blocking guests, bots, and Newly registered users from accessing the full memberlist, despite permissions settings.
if (in_array($mode, array('', 'group', 'searchuser', 'livesearch')))
{
if ($user->data['group_id'] == 7 OR $user->data['is_bot'])
{
trigger_error('NO_VIEW_USERS');
}
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN_EXPLAIN_MEMBERLIST']);
}
}
// End custom restrictions
Note: Newly registered users group must be the user's default group in order for this to work on new users.