Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-20941 store hashed username into user->email field for deleted us…

…ers. Backported from 19_STABLE
  • Loading branch information...
commit 68bbdf091b449344930df36e4bb4e293daf0fb2d 1 parent 90cb3f7
@stronk7 stronk7 authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 admin/user.php
View
6 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);
Please sign in to comment.
Something went wrong with that request. Please try again.