MDL-20941 store hashed username into user->email field for deleted users. Backported from 19_STABLE
This commit is contained in:
+4
-2
@@ -114,8 +114,8 @@
|
||||
$updateuser->id = $user->id;
|
||||
$updateuser->deleted = 1;
|
||||
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
|
||||
$updateuser->email = ''; // Clear this field to free it up
|
||||
$updateuser->idnumber = ''; // Clear this field to free it up
|
||||
$updateuser->email = md5($user->username); // Store hash of username, useful importing/restoring users
|
||||
$updateuser->idnumber = ''; // Clear this field to free it up
|
||||
$updateuser->timemodified = time();
|
||||
if (update_record('user', $updateuser)) {
|
||||
// Removing a user may have more requirements than just removing their role assignments.
|
||||
@@ -432,6 +432,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
require_once($CFG->dirroot . '/blocks/extrafields/admin_user.php');
|
||||
|
||||
|
||||
admin_externalpage_print_footer($adminroot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user