Skip to content

Commit

Permalink
also compare ID
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Nov 14, 2017
1 parent 5fcdb12 commit 5ea0c9f
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -85,7 +85,11 @@ public View getView(String viewId) throws Exception {
User user = null;
if (getRealm().getIdentityManager().getUserManager().existsAlias(email)) {
String trueId = realm.getIdentityManager().getUserManager().getTrueId(userInfo.getEmail());
user = realm.getIdentityManager().getUserManager().getUser(trueId, true);
if (trueId.equals(userInfo.getId())) {
user = realm.getIdentityManager().getUserManager().getUser(trueId, true);
} else {
throw new Exception("E-Mail '" + email + "' exists as alias, but user IDs do not match!");
}
} else {
log.warn("User '" + email + "' does not exist yet, hence create account and login user ...");

Expand Down

0 comments on commit 5ea0c9f

Please sign in to comment.