Skip to content

Commit

Permalink
Ensure storage of case-sensitive displayname for users in registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan971 committed Dec 14, 2022
1 parent 2003f6f commit a9df700
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,15 @@ public UserModel addUser(RealmModel realm, String id, String username, boolean a
.forEach(userModel::addRequiredAction);
}

// Ensure case-sensitive username stored as displayname attribute
userModel.setSingleAttribute("displayname", username);

return userModel;
}

@Override
public UserModel addUser(RealmModel realm, String username) {
return addUser(realm, KeycloakModelUtils.generateId(), username.toLowerCase(), true, true);
return addUser(realm, KeycloakModelUtils.generateId(), username, true, true);
}

@Override
Expand Down

0 comments on commit a9df700

Please sign in to comment.