diff options
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e1601e9a0d..d29743d8ff 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -359,14 +359,6 @@ switch ($mode) $sql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id"); - - // a_user admins and founder are able to view inactive users and bots to be able to - // manage them more easily - if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) - { - $sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; - } - $result = $db->sql_query($sql); $member = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -376,6 +368,20 @@ switch ($mode) trigger_error('NO_USER'); } + // a_user admins and founder are able to view inactive users and bots to be able to manage them more easily + // Normal users are able to see at least users having only changed their profile settings but not yet re-activated. + if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) + { + if ($row['user_type'] == USER_IGNORE) + { + trigger_error('NO_USER'); + } + else if ($row['user_type'] == USER_INACTIVE && $row['user_inactive_reason'] != INACTIVE_PROFILE) + { + trigger_error('NO_USER'); + } + } + $user_id = (int) $member['user_id']; // Do the SQL thang |