diff --git a/admin/user.php b/admin/user.php index 61ca92c4142..c4846188cc5 100644 --- a/admin/user.php +++ b/admin/user.php @@ -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);