Skip to content

Commit

Permalink
Fix idp domain being dropped when checking for existing user.
Browse files Browse the repository at this point in the history
  • Loading branch information
RushanNanayakkara committed Feb 8, 2024
1 parent 2087dc9 commit ad8dee2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1289,11 +1289,9 @@ public boolean isUsernameAlreadyTaken(String username, String tenantDomain) thro
tenantDomain = MultitenantUtils.getTenantDomain(username);
}
try {
String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(username);

UserRealm userRealm = getUserRealm(tenantDomain);
if (userRealm != null) {
isUsernameAlreadyTaken = userRealm.getUserStoreManager().isExistingUser(tenantAwareUsername) ||
isUsernameAlreadyTaken = userRealm.getUserStoreManager().isExistingUser(username) ||
hasPendingAddUserWorkflow(username, tenantDomain);
}
} catch (CarbonException | org.wso2.carbon.user.core.UserStoreException e) {
Expand Down

0 comments on commit ad8dee2

Please sign in to comment.