The discussion revolves around an issue where users cannot change their usernames in Discourse when using SSO with WordPress. namtrok initially reported the problem, and cpradio and AdamCapriola identified that the sso overrides username setting was likely the cause. riking confirmed that disabling this setting allows username changes, which namtrok verified worked. Grex315 raised concerns about potential SSO issues when changing usernames, but AdamCapriola and fefrei clarified that SSO relies on external ID and email, not username, so changes in Discourse won’t break the connection. jord8on asked if username changes could sync back to WordPress, but riking and tobiaseigen confirmed that sync is one-way from WordPress to Discourse, and any changes must be made in WordPress to propagate to Discourse. tobiaseigen also noted that admins often handle username changes to maintain consistency.
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.
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.
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?
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.
@riking você mencionou que, na época desta postagem, em 2015, não havia como sincronizar um nome de usuário de volta para o Wordpress.
Eu gosto de ter meu WP como fonte da verdade. Mas eu quero permitir que os usuários alterem seus nomes de usuário aqui no Discourse e sincronizem de volta com o WP como provedor de SSO. (às vezes o prefixo do e-mail deles, que é o padrão para o nome de usuário, não é o que as pessoas desejam como nome de usuário).
Ainda não é assim que funciona. Com este plugin, a sincronização é unidirecional, do WordPress para o Discourse. Com o SSO configurado, o ideal é alterar o nome de usuário no WordPress e permitir que a alteração seja sincronizada para o Discourse. Em minha comunidade, essa é uma tarefa de administrador, em parte porque, em alguns casos, é necessário atualizar em massa as menções ao antigo nome de usuário. Os usuários podem solicitar aos administradores que alterem seus nomes de usuário.
@tobiaseigen Muito obrigado por dedicar tempo para formular essa resposta.
É útil saber que você está na mesma situação e entender exatamente como está lidando com isso. Eu pensava que isso poderia ser o que teríamos que fazer, e me sinto mais confiante ao saber que outros usuários experientes do Discourse estão gerenciando esse problema dessa maneira.