mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-54106-master' of https://github.com/lucaboesch/moodle
This commit is contained in:
commit
5ec2ce20f5
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user