Continuing the discussion from SSO with Wordpress but users cannot change their username:
I’m using the Discourse Wordpress plugin with WP as my SSO provider.
When a person creates their account in WP, I have it set up that they create the account through Woocommerce. I also have a setting in place that prevents them from logging in until they have confirmed their WP account via email verification.
When a user then visits the forums, they have to click the “Login” button, and if the user has verified and is logged in, then they will be authenticated to Discourse and their forum account provisioned.
I have been allowing users to change their username in Discourse
What are the consequences of changing a user username?
Well, I’ve noticed that what happens in Wordpress is that their account is REMOVED/DELETED from my Woocommerce/WP database. Nowhere to be found.
Then when the user tries to log back in, they can’t… of course, b/c they don’t have an account on WP anymore. Is this expected? Has anyone else experienced this?!
I’ve since changed the “username change period” to “0”
“The maximum number of days after registration that accounts can change their username (0 to disallow username change).”
If someone wants to change their username they can contact us and we can change it in Wordpress so that it matches in the forums. That seems to work. (using the “Username Changer” plugin that @AdamCapriola suggested here.)