Merge branch 'MDL-42884_master' of https://github.com/markn86/moodle

This commit is contained in:
Dan Poltawski 2013-11-18 14:41:06 +08:00
commit b6813d8f6a

View File

@ -4247,7 +4247,7 @@ function delete_user(stdClass $user) {
\core\session\manager::kill_user_sessions($user->id);
// Workaround for bulk deletes of users with the same email address.
$delname = "$user->email.".time();
$delname = clean_param($user->email . "." . time(), PARAM_USERNAME);
while ($DB->record_exists('user', array('username' => $delname))) { // No need to use mnethostid here.
$delname++;
}