Closed (fixed)
Project:
Email Change Confirmation
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2012 at 09:58 UTC
Updated:
10 Oct 2013 at 19:28 UTC
Hook and rule get the new email address twice and not the old email address. I've made a small change in the `email_confirm_user_change_mail` function right before the user_save call (around lines 254 - 258):
$old_mail = $account->mail;
user_save($account, array('mail' => $new_mail, 'login' => REQUEST_TIME, 'email_confirmed' => TRUE));
module_invoke_all('email_confirm', 'email confirmation', $account->uid, $old_mail, $new_mail);
if (module_exists('rules')) {
rules_invoke_event('email_confirm_email_change_confirmation', $account, $old_mail, $new_mail);
}
Comments
Comment #1
MarcElbichon commented+1
Changed to major.
Comment #2
jaydub commentedLooks like the user_save() is updating the $account object which makes sense. I've pushed the fix in git. If I could get one of you to test out the changes with current email_confirm code in git or by downloading a -dev tarball (once it's been updated) to verify that would be great. If the fix works as it should I'll make a new release.
Comment #3
MarcElbichon commentedTest with success.
Thanks
Comment #4
jaydub commented