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

Command icon 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

guedressel created an issue. See original summary.

guedressel’s picture

Issue summary: View changes

fixed description markup

bramdriesen’s picture

Version: 8.x-1.x-dev » 2.2.x-dev

Doesn'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

mhdev90’s picture

Assigned: Unassigned » mhdev90

mhdev90’s picture

I'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.

mhdev90’s picture

Status: Active » Needs review