From 5cb477c4a11d0fa24bc535abef4364f86fe9c1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0koda?= Date: Sat, 30 Jun 2012 08:55:39 +0200 Subject: [PATCH] MDL-34120 do not try to create new passwords for incorrectly deleted users There is still some code that ignores delete_user() and instead hacks the user table directly, skip the borked user records for now when sending new passwords. --- lib/cronlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cronlib.php b/lib/cronlib.php index b0347606e13..c51fef19214 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -212,7 +212,7 @@ function cron_run() { p.id as prefid FROM {user} u JOIN {user_preferences} p ON u.id=p.userid - WHERE p.name='create_password' AND p.value='1' AND u.email !='' AND u.suspended = 0 AND u.auth != 'nologin'"); + WHERE p.name='create_password' AND p.value='1' AND u.email !='' AND u.suspended = 0 AND u.auth != 'nologin' AND u.deleted = 0"); // note: we can not send emails to suspended accounts foreach ($newusers as $newuser) {