I’ll start by laying out the current flow as I am seeing it happen (most, if not all, or this aligns with what @RGJ outlined):
-
Admin goes to a non-staff user’s preferences and changes their email address:
Once submitted, the admin sees the following message:
We’ve sent an email to that address. Please follow the confirmation instructions.
-
The above message does not appear accurate since TWO emails are sent to the old email address:
[Demo] Your email address has been changed
This is an automated message to let you know that your email address for
Demo has been changed. If this was done in error, please contact
a site administrator.Your email address has been changed to:
[Demo] Password reset
Somebody asked to reset your password on Demo.
If it was not you, you can safely ignore this email.
Click the following link to choose a new password:
https://example.discourse.site/u/password-reset/74d53d7d2cf20dsbc360614844c653s2 -
I tested three separate scenarios from this point. Each bullet point represents its own scenario:
-
The user has access to the old email and follows the reset password link. Upon updating their password, they are logged in. From there, they can log in with their username or the OLD email address. The new email does not seem to be in place at this point.
-
The user tries to log in with their username or the new email address and receives this:
Option 1: Hitting resend will display the following message (note it mentions the new email address this time):
An email does indeed get sent to the the new email address:
[Demo] Confirm your new account
Welcome to Demo!
Click the following link to confirm and activate your new account:
https://example.discourse.site/u/activate-account/74d53d7d2cf20dsbc360614844c653s2If the above link is not clickable, try copying and pasting it into the address bar of your web browser.
Following the link goes through some of the pages for activating a new account. In the end the user successfully logs in. From this point the user can log in with their username or the OLD email address. The new email does not seem to be in place at this point.
Option 2: Hitting the change email address button shows the following. The Update Email Address button is disabled when the new email address is in the text field, implying the new email is already active (but that doesn’t appear to be true).
-
The user initiates a password reset. The email goes to the new email address and the user can log in with the link. As with the other scenarios, the user can log in with their username or the OLD email address. The new email does not seem to be in place at this point.
-
So definitely repro’ing stuff here. It’s a tricky thing to write out clearly, but hopefully between the OP and this outline, it will make sense. There certainly appear to be some things that need fixing.
@martin I know you’ve tinkered with this part of core in the past. Would you be able to weigh in here when you have a moment?



