Skip to content

Commit

Permalink
fix[UserService]: re-implement email checker for sign-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucy Ciara Herud-Thomassen authored and Lucy Ciara Herud-Thomassen committed Apr 21, 2026
1 parent 0eeb864 commit ad840a7
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 ad840a7

Please sign in to comment.