Added missing translation in admin_ug_auth (#861)

This commit is contained in:
Roman Kelesidis 2023-08-23 01:30:21 +07:00 committed by GitHub
commit ad38225f2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -73,7 +73,7 @@ if ($submit && $mode == 'user') {
if (isset($_POST['userlevel'])) {
if ($_POST['userlevel'] === 'admin') {
if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID) {
bb_die('Could not update admin status');
bb_die($lang['AUTH_GENERAL_ERROR']);
}
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . ADMIN . " WHERE user_id = $user_id");
@ -90,7 +90,7 @@ if ($submit && $mode == 'user') {
elseif ($_POST['userlevel'] === 'user') {
// ignore if you're trying to change yourself from an admin to user!
if ($userdata['user_id'] == $user_id) {
bb_die('Could not update admin status<br /><br />Could not change yourself from an admin to user');
bb_die($lang['AUTH_SELF_ERROR']);
}
// Update users level, reset to USER
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . USER . " WHERE user_id = $user_id");