Merge/change accounts after SSO

AI-generated summary

Judith migrated a phpBB forum to Discourse and implemented SSO, but users with mismatched emails now have duplicate accounts — a legacy one with content and an empty SSO one. She seeks a GUI solution to redirect SSO logins to legacy accounts without merging or losing usernames/settings Judith. Gerhard notes only a CLI merge tool exists gerhard, but Judith clarifies merging is undesirable since 99% of SSO accounts are empty and should be deleted, not merged Judith. She tried changing her email in the console but SSO still routes to the wrong account, asking @codinghorror what DB fields control login routing and if a UI option could be added Judith. Gerhard suggests instead: delete the SSO-created account and update the legacy account’s email to match the SSO system — all doable via UI gerhard.

I migrated a phpbb forum to Discourse and then used SSO in order to have everyone log in through our organization’s site, where they already had accounts. This worked great for those who had used the same email address to sign up for the organisation and for the forum, but not great for those who used different email addresses, they all have two accounts now (a legacy one with profile + posts, and a new one from the SSO). Is there any way to change this so that next time they log in via SSO, they find themselves in the legacy account? Ideally from the Admin panel, not commandline, because this will concern hundreds of users. Neither the user email field nor external id field seem editable…

Unfortunately there’s only a command line option right now: Rake task for merging users

Thanks, I was hoping that there was an easier option because I don’t need to merge accounts in 99% of cases (since the new accounts are empty and should be deleted), I just want the SSO to log them into their old accounts. Merging them, especially per the second quote, is only a far second on the preference order, especially since it would mean abandoning their old user names and settings and pushing all content into the empty SSO accounts.

How does the system even know which account to log someone into? When I noticed that Discourse had created a bogus account for me, I went into the Discourse console and changed my email address there in order to try to get logged into the right account, but it still sends me to the bogus one even though the email addresses no longer match.

@codinghorror, any idea of what I’d have to change in the database so that the SSO logs them into their old accounts? Just changing the email address doesn’t seem to be enough. And is there any chance of a graphical interface for making this change, e.g. as part of the admin edit profile function?

I’d suggest deleting the account created by SSO and updating the old account with the correct email address, so that it matches the one used in your SSO system. You can do all of this in the UI.