Browse Source

#59 Don't allow users to deactivate themselves

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

6
admin/manage_users.php

@ -1078,6 +1078,12 @@ function toggle_active()
$myuser = intval(hesk_GET('id')) or hesk_error($hesklang['no_valid_id']);
$_SESSION['seluser'] = $myuser;
if (intval($myuser) == $_SESSION['id'])
{
//-- You can't deactivate yourself!
hesk_process_messages($hesklang['self_deactivation'], './manage_users.php');
}
if (intval(hesk_GET('s')))
{
$active = 1;

1
language/en/text.php

@ -31,6 +31,7 @@ $hesklang['enable_user'] = 'User is inactive (click to activate)';
$hesklang['user_activated'] = 'User has been activated';
$hesklang['user_deactivated'] = 'User has been deactivated';
$hesklang['active_user'] = 'Is active user';
$hesklang['self_deactivation'] = 'You cannot deactivate yourself!';
// ADDED OR MODIFIED IN NuMods 1.4.0
$hesklang['numods'] = 'NuMods';

Loading…
Cancel
Save