Modificacion si un firstName esta nulo

This commit is contained in:
Mariela Bonilla 2021-07-18 21:57:02 -06:00
parent 5d0c87d8d6
commit 53aa021001
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ public class AccountResource {
public void requestPasswordReset(@RequestBody String mail) {
Optional<User> 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();