if an empty email address is used, display a more specific message

This commit is contained in:
Derek Monturo 2017-03-07 10:23:51 -05:00
parent d6e4ef793e
commit 0ecf679c7f

View file

@ -172,6 +172,10 @@ public class Session {
}
static private String validateEmail(String email) {
if (email == null || email.isEmpty()) {
return "Email address cannot be blank";
}
AuthorizedUser authorizedUser = AuthorizedUserRepository.instance.getByEmail(email);
if (authorizedUser != null) {
return "Email address '" + email + "' is associated with another user";