Skip to content

Commit

Permalink
Merge pull request #75 from Group-5/fix/email-check
Browse files Browse the repository at this point in the history
fix[UserService]: re-implement email checker for sign-up
  • Loading branch information
fredrjm authored Apr 21, 2026
2 parents 3399f81 + ad840a7 commit a6982e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/edu/group5/app/model/user/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public boolean registerUser(String role, String firstName, String lastName,
firstName == null || firstName.trim().isEmpty() ||
lastName == null || lastName.trim().isEmpty() ||
email == null || email.trim().isEmpty() ||
passwordHash == null || passwordHash.trim().isEmpty()) {
passwordHash == null || passwordHash.trim().isEmpty() ||
this.getUserByEmail(email) != null) {
return false;
}
User user;
Expand Down

0 comments on commit a6982e8

Please sign in to comment.