sorry, yes thats what i meant
thanks
As forum admin, I like to change the e-mail of a user. The userâs e-mail provider went out of business.
I know the user and the user is authenticated to me by authenticated e-mail (gpg / OpenPGP) so I have no doubts about the legitimacy of the request.
Discourse sends a verification e-mail to the old e-mail address which will never arrive. Hence, e-mail cannot be updated.
Any advice?
If you have access to the siteâs rails console, you can change email addresses without triggering a confirmation email.
Enter the docker container and then launch the rails console:
./launcher enter app
rails c
Then find the user from their current email address:
u = User.find_by_email('oldemail@example.com')
Then update the email address:
u.update(email: 'newemail@example.com')
EDIT:
After updating the userâs email address though the command line, go to the Admin / Users page for the user. In the Permissions section of that page, click the âDeactivate Accountâ button. You will then see two new buttons, âSend Activation Emailâ, and âActivate Account.â Click the âSend Activation Emailâ button. This will send the âWelcome to Discourse!â email to the new email address. The user can click the link in that email to reaccess their account.
If the user is an Admin, youâll have to Revoke Admin
access first to be able to Deactivate Account
.
This works initially but e-mail is subsequently automatically reset to old e-mail address.
User reported âThis sends out new account creation confirmation.â
The old e-mail (provider no longer existing) is probably receiving a confirmation mail which the user cannot confirm. Hence, back to square one.
Are you using SSO to log users into Discourse?
Sorry, you are right. I have used this method for updating email addresses for sites that are using SAML login, and it works. For sites using password logins you need to do one more step.
After updating the userâs email address though the command line, go to the Admin / Users page for the user. In the Permissions section of that page, click the âDeactivate Accountâ button. You will then see two new buttons, âSend Activation Emailâ, and âActivate Account.â Click the âSend Activation Emailâ button. This will send the âWelcome to Discourse!â email to the new email address. The user can click the link in that email to reaccess their account.
If I find a more straightforward way of doing this, Iâll update my post.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.