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?
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.
Can you repro this @techapj?
Yes, I can repro this issue on try. Added on my list to fix