diff --git a/src/main/java/org/datasurvey/web/rest/AccountResource.java b/src/main/java/org/datasurvey/web/rest/AccountResource.java index e175751..361be3a 100644 --- a/src/main/java/org/datasurvey/web/rest/AccountResource.java +++ b/src/main/java/org/datasurvey/web/rest/AccountResource.java @@ -168,7 +168,7 @@ public class AccountResource { public void requestPasswordReset(@RequestBody String mail) { Optional user = userService.requestPasswordReset(mail); if (user.isPresent()) { - if (!user.get().getFirstName().equals("IsGoogle")) { + if (user.get().getFirstName() == null || (!user.get().getFirstName().equals("IsGoogle"))) { mailService.sendPasswordResetMail(user.get()); } else { throw new UserIsGoogleException();