Posted by tomho on October 15, 2009 at 6:34pm
| Project: | Password policy |
| Version: | 6.x-1.0-alpha2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | afreeman |
| Status: | closed (fixed) |
Issue Summary
When password policy module is installed, my drupal setup is sending off both Account activation email and password recovery email to new users who got their accounts set from "block" to "active" state.
Deleting the password rules i set in the password policy module did not fix it, once i uninstalled the module the behaviour goes back to normal.
Anyone know a quick fix?
Thanks,
Tom
Comments
#1
#2
Has anyone looked at this?
Seems like a really critical bug if it is triggering wrong emails.
#3
Confirmed, happens only when unblocked from /user/%/edit, doesn't when done via /admin/user/expired or bulk operations, the culprit is call to
_password_policy_unblock()from op inhook_user(), which is redundant since in D6 there is following code inuser_save():<?php// Send emails after we have the new user object.
if (isset($array['status']) && $array['status'] != $account->status) {
// The user's status is changing; conditionally send notification email.
$op = $array['status'] == 1 ? 'status_activated' : 'status_blocked';
_user_mail_notify($op, $user);
}
?>
Attached patch fixes that, also changed
_password_policy_unblock()for consistency.#4
Forgot to check status.
#5
subscribe
#6
Rerolled to work with latest dev release, backed out change that removed password reset mail code from _password_policy_unblock()
#7
You can't have both
user_save($account, array('status' => 1));and password reset mail code in _password_policy_unblock() as it would recreate this problem at /admin/user/expired.#8
Well I just committed #6, so please submit a fixed patch on what's in HEAD now.
#9
Would like to know what was the reasoning behind afreeman's change first, was #4 causing any problems ?
#10
Imperfect understanding of what these mails represented and when they're typically sent. I get it now. #7 is accurate.
#11
#12
#13
Automatically closed -- issue fixed for 2 weeks with no activity.