If you’re using Wordpress as the authority for SSO what benefit is there to storing a second email in Discourse?
right-o. unless I store it in wordpress too for the same reasons. but I don’t know how to prevent this rake task from storing a secondary email when merging users.
If secondary emails are an issue can’t they just be removed?
Yes, that is one easy solution. Is there a rake task someone can share to list all the users with secondary emails, and to delete their secondary emails?
That said, I’d prefer to see discourse evolve to take advantage of a cool new feature like secondary emails rather than have to find ways to work around it. Other people are likely to bump up against this issue too at some point and wonder why the email address is not updating in discourse when updated in wordpress.
I don’t think there’s a rake task, but you could do it from the rails console. There should be some example queries about secondary emails for data explorer and some sample
.update_all code for other rails examples. It’ll take more time than I can spare here today. If you’re stuck and want to pay, my contact info is in my profile.
Here’s what you’re looking for: Additional email address per user account support
I’ve written a plugin which makes it easier to run this task: