Changing Email address of unregistered account for activation

Hello!
If we change email for activation registered account too quiqly then enqueue_activation_email method of users_controller enqueue job without delay, so we got message to old email. May be it should be something that:

Jobs.enqueue_in(2.second, :critical_user_email, type: :signup, user_id: @user.id, email_token: @email_token.token)

or may be it possible to set low priority to that job?
Thanks!

إعجاب واحد (1)

Can you describe exactly how you are doing this? Through the API or through the user interface by clicking / tapping buttons, etc?

I do it through the user interface, by clicking on change email button for sending activation message after account registration. Paste other email-address at once, but receive message to old email. Same if click on back button in browser and type new email. If i do delay, then all is ok.

Are you attempting to change password on a staff account? This requires verifying both old AND new emails for security reasons.

I attempt to change an email-address of newly created account, that not activated yet.

3 إعجابات

Can you repro this @techapj?

إعجاب واحد (1)

Yes, I can repro this issue on try. Added on my list to fix :memo:

4 إعجابات

Fixed via:

https://github.com/discourse/discourse/commit/2e2b5e28aa6711a549715a3892f062981546c270

Thanks for reporting this issue @youwiki :+1:

4 إعجابات