Closes #65: The god admin cannot be edited by other users
This commit is contained in:
parent
eff111e583
commit
a45d97a9db
@ -387,8 +387,10 @@ while ($myuser = hesk_dbFetchAssoc($res))
|
||||
if ($myuser['id'] == $_SESSION['id'])
|
||||
{
|
||||
$edit_code = '<a href="profile.php"><i style="font-size: 16px" class="fa fa-pencil" data-toggle="tooltip" data-placement="top" title="'.$hesklang['edit'].'"></i></a>';
|
||||
}
|
||||
else
|
||||
} elseif ($myuser['id'] == 1)
|
||||
{
|
||||
$edit_code = ' <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
|
||||
} else
|
||||
{
|
||||
$edit_code = '<a href="manage_users.php?a=edit&id='.$myuser['id'].'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['edit'].'"><i style="font-size: 16px" class="fa fa-pencil"></i></a>';
|
||||
}
|
||||
@ -541,6 +543,11 @@ function edit_user()
|
||||
hesk_process_messages($hesklang['eyou'],'profile.php','NOTICE');
|
||||
}
|
||||
|
||||
if ($id == 1)
|
||||
{
|
||||
hesk_process_messages($hesklang['cant_edit_admin'],'./manage_users.php');
|
||||
}
|
||||
|
||||
$_SESSION['edit_userdata'] = TRUE;
|
||||
|
||||
if ( ! isset($_SESSION['save_userdata']))
|
||||
|
@ -36,6 +36,7 @@ $hesklang['self_deactivation'] = 'You cannot deactivate yourself!';
|
||||
$hesklang['inactive_user'] = 'Your account is currently inactive. Contact an administrator for more information.';
|
||||
$hesklang['notify_customer_email'] = 'Emails to customer on reply';
|
||||
$hesklang['notify_customer_email_text'] = 'Don\'t send email notifications of replies to the customer by default';
|
||||
$hesklang['cant_edit_admin'] = 'You cannot edit the God Admin (User ID = 1)';
|
||||
|
||||
// ADDED OR MODIFIED IN NuMods 1.4.0
|
||||
$hesklang['numods'] = 'NuMods';
|
||||
|
Loading…
x
Reference in New Issue
Block a user