Maybe I’m missing something obvious, but I cannot find it. As an admin, can I change someone’s email address without them having to verify it?
Off-hand, I’d guess something like this would work:
cd /var/discourse ./launcher enter app rails c User.find_by(email: "firstname.lastname@example.org").update(email: "email@example.com") exit exit
That’s console access, obviously.
I vaguely recall another topic here about this exact situation; try some searches.
Try this, the verification mail goes out, but they don’t have to respond to it:
Too late for me to edit that now, but it should be deactivate, change, reactivate iirc.
No problem I made it a wiki.
I am a new discourse user and I ran into the same issue. When I try the same approach (deactivate the user, update the email address, and then activate the user) it sending an email to confirm and it is only updating the email address after clicking the confirm email link. Is there a way to avoid this? I am using the API to do all the three actions.
There has been a change in the way emails are stored in the database.
The following commands should work:
cd /var/discourse sudo ./launcher enter app rails c UserEmail.find_by(email: "firstname.lastname@example.org").update(email: "email@example.com")
This will work fine but I am trying to do this via API as I will have to update multiple email addresses on a daily basis. Is it possible to do this via API?