Skip to content

Commit

Permalink
Issue #9 chores: fall-back mechanism for when user details does not m…
Browse files Browse the repository at this point in the history
…atch with phone number, but contains all characters as digits.
  • Loading branch information
shriharshs committed Dec 19, 2017
1 parent c268785 commit ea0b08f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@ private UserModel getUser(AuthenticationFlowContext context, String username) {
logger.error("AbstractPhoneFormAuthenticator@getUser : Users List - " + userModels.size());
logger.error("AbstractPhoneFormAuthenticator@getUser : First User - " + userModels.get(0).getUsername());
return userModels.get(0);
} else {
return KeycloakModelUtils.findUserByNameOrEmail(context.getSession(), context.getRealm(), username);
}
} else {
return KeycloakModelUtils.findUserByNameOrEmail(context.getSession(), context.getRealm(), username);
}

logger.error("AbstractPhoneFormAuthenticator@getUser : No user found!");
return null;
}

public boolean validatePassword(AuthenticationFlowContext context, UserModel user, MultivaluedMap<String, String> inputData) {
Expand Down

0 comments on commit ea0b08f

Please sign in to comment.