Skip to content

Commit

Permalink
Remove error messages about moving/deleting/banning oneself.
Browse files Browse the repository at this point in the history
These cases are already taken care of by other error messages.
Related to #168.
  • Loading branch information
franzliedke committed Mar 22, 2011
1 parent 8e3c445 commit 9927f30
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions admin_users.php
Expand Up @@ -275,9 +275,6 @@
if (empty($user_ids))
message($lang_admin_users['No users selected']);

if (in_array($pun_user['id'], $user_ids))
message($lang_admin_users['No move self message']);

// Are we trying to batch move any admins?
$result = $db->query('SELECT COUNT(*) FROM '.$db->prefix.'users WHERE id IN ('.implode(',', $user_ids).') AND group_id='.PUN_ADMIN) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if ($db->result($result) > 0)
Expand Down Expand Up @@ -404,9 +401,6 @@
if (empty($user_ids))
message($lang_admin_users['No users selected']);

if (in_array($pun_user['id'], $user_ids))
message($lang_admin_users['No delete self message']);

// Are we trying to delete any admins?
$result = $db->query('SELECT COUNT(*) FROM '.$db->prefix.'users WHERE id IN ('.implode(',', $user_ids).') AND group_id='.PUN_ADMIN) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if ($db->result($result) > 0)
Expand Down Expand Up @@ -550,9 +544,6 @@
if (empty($user_ids))
message($lang_admin_users['No users selected']);

if (in_array($pun_user['id'], $user_ids))
message($lang_admin_users['No ban self message']);

// Are we trying to ban any admins?
$result = $db->query('SELECT COUNT(*) FROM '.$db->prefix.'users WHERE id IN ('.implode(',', $user_ids).') AND group_id='.PUN_ADMIN) or error('Unable to fetch group info', __FILE__, __LINE__, $db->error());
if ($db->result($result) > 0)
Expand Down
3 changes: 0 additions & 3 deletions lang/English/admin_users.php
Expand Up @@ -9,11 +9,8 @@

// Actions: mass delete/ban etc.
'No users selected' => 'No users selected.',
'No move self message' => 'For security reasons, you are not allowed to move yourself to a different group using this function.',
'No move admins message' => 'For security reasons, you are not allowed to move multiple administrators to another group. If you want to move these administrators, you can do so on their respective user profiles.',
'No delete self message' => 'For security reasons, you are not allowed to delete yourself using this function. If you really want to delete your user profile, please ask another administrator to demote you and then delete your profile.',
'No delete admins message' => 'Administrators cannot be deleted. In order to delete administrators, you must first move them to a different user group.',
'No ban self message' => 'For security reasons, you are not allowed to ban yourself.',
'No ban admins message' => 'Administrators cannot be banned. In order to ban administrators, you must first move them to a different user group.',
'No ban mods message' => 'Moderators cannot be banned. In order to ban moderators, you must first move them to a different user group.',
'Move users' => 'Change user group',
Expand Down

0 comments on commit 9927f30

Please sign in to comment.