1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-24 09:12:56 +02:00

again... some more fixes.

git-svn-id: file:///svn/phpbb/trunk@7150 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-03-08 15:49:13 +00:00
parent 738d26f92c
commit fcec5b61da
18 changed files with 154 additions and 48 deletions

View File

@@ -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