diff --git a/src/main/java/edu/group5/app/control/AuthController.java b/src/main/java/edu/group5/app/control/AuthController.java index 7c34afd..11c3288 100644 --- a/src/main/java/edu/group5/app/control/AuthController.java +++ b/src/main/java/edu/group5/app/control/AuthController.java @@ -95,8 +95,9 @@ public void handleSignUp(SignUpPageView view, String firstName, String lastName, privacyPolicy.setHeaderText("Accept Privacy Policy"); privacyPolicy.setContentText( "Your user information like:\n" + - "Name and email—as well as donations tied to your account—will be saved locally on your machine.\n" + - "By creating an account, you accept the right of our app to store this information."); + "Name and email—as well as donations tied to your account—will be saved locally on your machine.\n" + + "This information is only used to create your account, and no data will be sold to third parties.\n" + + "By creating an account, you accept the right of our app to store this information on your computer."); if (privacyPolicy.showAndWait().orElse(ButtonType.CANCEL) == ButtonType.OK) { boolean success = userService.registerUser( diff --git a/src/main/java/edu/group5/app/model/user/UserService.java b/src/main/java/edu/group5/app/model/user/UserService.java index 6bee483..e6439f1 100644 --- a/src/main/java/edu/group5/app/model/user/UserService.java +++ b/src/main/java/edu/group5/app/model/user/UserService.java @@ -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;