When renaming a user (from jb1 to jb), I get this error message: There was an error changing your username.
No information is recorded in /logs.
The old username was created because the user used SSO for the first time, and his name was too short. Now, I changed the minimum username length, and wanted to adjust his name.
Changing username minimum after the fact (e.g. setting minimum username length to 4 chars, when you have ten users with 2 char usernames) will cause lots of problems.
I found it: sso overrides username prevents the name change.
I still consider this situation a bug. Enabling this setting should either hide the Change Username button from the administrator panel and disable the users/.../preferences/username page, or still allow username changes for admins (possibly with a warning).
I’d prefer the latter, to allow admins to manually “untangle” cases where Discourse’s change-illegal-names-system has created unintended names.
Questa PR aggiunge casi di test per il problema descritto nell’OP, così da poter essere sicuri che, in generale, la sovrascrittura del nome utente, ad esempio da jb1 a jb, funzioni: