I’ve just started hosting a very small, private Discourse community. I’m a newbie; please be gentle.
When I originally set the community up, I set it up at foo.com. My members and I hadn’t determined what permanent domain we’d like, so I set one up temporarily. After we’d made that determination to switch to bar.com, I followed the instructions here to change the domain. It worked almost perfectly.
There was one slight hitch: originally, my admin account was set in Discourse to use the email address admin@foo.com. The hostname for the Discourse install was simply foo.com; I did not use a subdomain. When I changed domains, I decided to use www.bar.com as the hostname; in other words, the original hostname did not include the www subdomain, but the new one did. The problem is two-fold: first, the instructions above for switching domains caused the admin email account to be changed to admin@www.bar.com (I assume it was the remap/rebake step that did this; willing to be wrong about this); second, when I try to correct the email address (to admin@bar.com), Discourse keeps trying to email admin@www.bar.com (according to my sparkpost message logs), which doesn’t exist. I assume it’s supposed to email the new email address so that I can confirm it exists. The result is that I have no way to get a correct email address for my admin account: the domain switch step changed it to something invalid, and the change email process keeps emailing an invalid address.
I’m new enough at this that I’m not sure if I’m reading the situation correctly. I’m happy to answer any questions. Thanks for you assistance and patience.
That’s correct. Email is sending to everyone else just fine. Performing another remap seems like a viable option. But why would Discourse be trying to email the address that I’m trying to switch from and not the one I’m trying to switch to? That’s the part I really don’t understand.
Huh. I guess I missed that. My apologies. This does seem really problematic; I would have thought that access to my Discourse account was proof enough that I should be allowed to change the email address. I don’t think I’ve ever had a system email my old address before as a necessary confirmation step (but then I don’t change email addresses often, so what do I know). This is intended behavior then, not a bug. I’ll try the suggested remap and see if that works. Thanks!
It is a security measure - and it only applies to Admin accounts. Among other things, email serves as a form of two-factor auth for admin tasks, like downloading backups. If your admin account was compromised and the email could be changed without your knowledge - they could simply change the email to get the backup. This feature prevents that.
I tried this just now and it appears to have worked. Thank you everyone for your patient assistance.
As a side question: is there a standard solution for if an admin needs to change their email address from an email address they no longer have access to? Or are you just out of luck at that point?
Your best bet is to work with another admin. Demote the account you need to change the email on. Change the email (no current email confirmation as you’re no longer admin). Promote the account back to admin.