Skip to content

Commit

Permalink
Bugfix for users with no chosenName
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Dec 14, 2023
1 parent ebc2e1c commit b8eb13c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,11 @@ protected List<SAMLAttribute> attributes(User user, String requesterEntityId) {
String givenName = user.getGivenName();
String familyName = user.getFamilyName();
String chosenName = user.getChosenName();

if (!StringUtils.hasText(chosenName)) {
chosenName = givenName;
//Migrate at JIT as only users with linked-accounts were migrated in myconext.mongo.Migrations#migrateUsers
user.setChosenName(chosenName);
}
String displayName = String.format("%s %s", chosenName, familyName);
String commonName = String.format("%s %s", givenName, familyName);
String eppn = user.getEduPersonPrincipalName();
Expand Down

0 comments on commit b8eb13c

Please sign in to comment.