MDL-20941 store hashed username into user->email field for deleted users. Merged from 19_STABLE

This commit is contained in:
Eloy Lafuente
2009-11-23 18:50:47 +00:00
parent e8f1ec0f77
commit 451db46177
+3 -3
View File
@@ -3441,9 +3441,9 @@ function delete_user($user) {
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = $delname; // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->username = $delname; // Remember it just in case
$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();
$DB->update_record('user', $updateuser);