Commit 5ec2ce20 authored by Damyon Wiese's avatar Damyon Wiese

Merge branch 'MDL-54106-master' of https://github.com/lucaboesch/moodle

parents e82c025e 7f8773ff
......@@ -51,8 +51,8 @@ class delete_unconfirmed_users_task extends scheduled_task {
$cuttime = $timenow - ($CFG->deleteunconfirmed * 3600);
$rs = $DB->get_recordset_sql ("SELECT *
FROM {user}
WHERE confirmed = 0 AND firstaccess > 0
AND firstaccess < ? AND deleted = 0", array($cuttime));
WHERE confirmed = 0 AND timecreated > 0
AND timecreated < ? AND deleted = 0", array($cuttime));
foreach ($rs as $user) {
delete_user($user); // We MUST delete user properly first.
$DB->delete_records('user', array('id' => $user->id)); // This is a bloody hack, but it might work.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment