SSO with Wordpress but users cannot change their username

I have the SSO for Wordpress installed configured and working,… users are able to signup/login as expected.

However users cannot change their username.

I’ve set the username change period to 90 days but that still doesn’t allow users to change their name (within 90 days of creating the account, users still cannot change their username)

Here’s the user’s screenshot showing the lack of an edit pencil next to their username.

「いいね!」 1

Fairly certain this is because you are using SSO and since you tied it to your wordpress database, that is where the change would have to take place.

「いいね!」 2

What @cpradio said and also I’m guessing you might have the sso overrides username setting enabled.

「いいね!」 6

Yep, if you turn that off people should be able to change their username again.

「いいね!」 2

Thanks all! I unchecked the sso overrides username and viola it worked!

Thanks for your help!

「いいね!」 3

Would this break the sso with workdpress if people are chaging their
username on Discourse? WP does not allow the changing of usernames.

There are some WP plugins that let you change usernames. I use this one:

If you have sso overrides username enabled then the next time the users logs in their username will update in Discourse. If you have it disabled, then I think if you just change their username in Discourse to match all should be fine.

「いいね!」 5

Great. Thanks.

When changing the username do i change in discourse as well or will SSO update it for me? I am assuming i need to update Discourse as well through admin so it does not create a new account correct?

Is there a way to allow a user to change usernames in Discourse and sync it back to WP?

「いいね!」 1

Not right now, no. The whole design of SSO is around the remote being the source of truth about identity.

「いいね!」 1

Changing the username will not break SSO.

SSO is never tied to the username, but to the external id and E-Mail address. If the external ID is not known to Discourse, it associates it with the account having the same E-Mail address (or creates a new one). Afterwards, any changes to the account won’t affect this invisible link, Discourse will always recognize the account by its ID.

「いいね!」 3

Thanks. That makes sense.

「いいね!」 1

私も全く同じ質問があります!

@riking さんは、2015 年のこの投稿時点では、ユーザー名を WordPress へ同期させる方法が存在しないと述べていました。

私は WordPress を真のデータソース(ソース・オブ・トゥルース)として活用したいと考えています。しかし、SSO プロバイダーとして WordPress を使用しつつ、Discourse 側でユーザーがユーザー名を変更し、それを WordPress へ同期させたいと考えています。(デフォルトではユーザー名がメールのプレフィックスになっていることがありますが、これがユーザーが望むユーザー名とは限らないためです)

まだその仕組みではありません。このプラグインを使用する場合、WordPress から Discourse への同期は一方向です。SSO を導入している場合、最も良い方法は WordPress でユーザー名を変更し、その変更を Discourse に同期させることです。私のコミュニティではこれは管理者のタスクの一部ですが、その理由の一つは、場合によっては旧ユーザー名の言及をまとめて更新する必要があるためです。ユーザーは管理者にユーザー名の変更を依頼することができます。

「いいね!」 5

@tobiaseigen ご丁寧にご回答いただき、本当にありがとうございます。

同じ状況に置かれている方がいること、そしてどのように対応されているかが明確に分かったことで、大変心強いです。私自身も、これが取らねばならない対応なのではないかと考えていましたが、経験豊富な Discourse ユーザーの方々が同様の方法でこの課題に対処されていると知って、安心いたしました。

「いいね!」 1