Skip to content

Commit

Permalink
MDL-34120 do not try to create new passwords for incorrectly deleted …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
skodak committed Jun 30, 2012
1 parent a5f6ea2 commit 5cb477c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cronlib.php
Expand Up @@ -212,7 +212,7 @@ function cron_run() {
p.id as prefid p.id as prefid
FROM {user} u FROM {user} u
JOIN {user_preferences} p ON u.id=p.userid 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 // note: we can not send emails to suspended accounts
foreach ($newusers as $newuser) { foreach ($newusers as $newuser) {
Expand Down

0 comments on commit 5cb477c

Please sign in to comment.