Skip to content

Commit

Permalink
Pick username java regex from alternative key if not resolved for non…
Browse files Browse the repository at this point in the history
…-primary user stores.
  • Loading branch information
RushanNanayakkara committed Nov 26, 2024
1 parent 2630019 commit 3690394
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,10 @@ private boolean validateAgainstRegex(String userName, RealmConfiguration realmCo

String regularExpression = realmConfig
.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_JAVA_REG_EX);
if (regularExpression == null && !realmConfig.isPrimary()) {
regularExpression = realmConfig.getUserStoreProperty(
UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_JAVA_REG);
}

if (MultitenantUtils.isEmailUserName()) {
regularExpression = realmConfig
Expand Down

0 comments on commit 3690394

Please sign in to comment.