mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-56547' of https://github.com/ak4t0sh/moodle
This commit is contained in:
commit
863e1a66a9
@ -70,6 +70,9 @@
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$delete, 'mnethostid'=>$CFG->mnet_localhost_id), '*', MUST_EXIST);
|
||||
|
||||
if ($user->deleted) {
|
||||
print_error('usernotdeleteddeleted', 'error');
|
||||
}
|
||||
if (is_siteadmin($user->id)) {
|
||||
print_error('useradminodelete', 'error');
|
||||
}
|
||||
@ -86,7 +89,7 @@
|
||||
echo $OUTPUT->confirm(get_string('deletecheckfull', '', "'$fullname'"), $deletebutton, $returnurl);
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
} else if (data_submitted() and !$user->deleted) {
|
||||
} else if (data_submitted()) {
|
||||
if (delete_user($user)) {
|
||||
\core\session\manager::gc(); // Remove stale sessions.
|
||||
redirect($returnurl);
|
||||
|
@ -560,6 +560,7 @@ $string['usernotaddederror'] = 'User not added - error';
|
||||
$string['usernotaddedregistered'] = 'User not added - already registered';
|
||||
$string['usernotavailable'] = 'The details of this user are not available to you';
|
||||
$string['usernotdeletedadmin'] = 'User not deleted - can not delete administrator accounts';
|
||||
$string['usernotdeleteddeleted'] = 'This user has already been deleted.';
|
||||
$string['usernotdeletederror'] = 'User not deleted - error';
|
||||
$string['usernotdeletedmissing'] = 'User not deleted - could not find the username';
|
||||
$string['usernotdeletedoff'] = 'User not deleted - deleting not allowed';
|
||||
|
Loading…
x
Reference in New Issue
Block a user