Problem/Motivation
In our current project the user management is fully delegated to Keycloak and renaming user accounts is a planned scenario. Therefore we would like to have a feature equivalent to userinfo_update_email for updating usernames in Drupal if they are changed in Keycloak.
Proposed resolution
Allow switching feature on/off via configuration.
Extend functionality of Keycloak::retrieveUserInfo().
Implement handling of non-unique usernames.
Remaining tasks
- Implement
User interface changes
Add a checkbox in configuration form "Update username in user profile"
API changes
None.
Data model changes
Add userinfo_update_username configuration value in keycloak.schema.yml
Issue fork keycloak-3276955
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
guedressel commentedfixed description markup
Comment #3
bramdriesenDoesn't sound like such a strange idea. However we have to think well on how to handle conflicts if the username is already taken. Tagging it for 2.2.x
Comment #4
mhdev90 commentedComment #6
mhdev90 commentedI'm still not sure how to deal with duplicate accounts. In my case, it is enough to display a message to the user after login. This ensures that users can still work in the system.
Comment #7
mhdev90 commented