Commit c15e2e97 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't allow admins to edit deleted users (bug #850578)



Change-Id: I94eb2837265d23b1458fafa6d129f92d5df88b63
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 077e5988
......@@ -45,6 +45,13 @@ if (!$USER->is_admin_for_user($user)) {
redirect('/user/view.php?id=' . $id);
}
if ($user->deleted) {
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE . ': ' . display_name($user));
$smarty->assign('message', get_string('thisuserdeleted', 'admin'));
$smarty->display('message.tpl');
exit;
}
// Site-wide account settings
$currentdate = getdate();
......
......@@ -629,6 +629,7 @@ $string['deleteusernote'] = 'Please note that this operation <strong>cannot be u
$string['youcannotadministerthisuser'] = 'You cannot administer this user';
$string['usernamechangenotallowed'] = 'The chosen authentication method does not allow changes to the username.';
$string['passwordchangenotallowed'] = 'The chosen authentication method does not allow changes to the password.';
$string['thisuserdeleted'] = 'This user has been deleted.';
// Add User
$string['adduser'] = 'Add User';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment