Browse Source

Closes #65: The god admin cannot be edited by other users

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
a45d97a9db
  1. 11
      admin/manage_users.php
  2. 1
      language/en/text.php

11
admin/manage_users.php

@ -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&amp;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']))

1
language/en/text.php

@ -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…
Cancel
Save