mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
if an empty email address is used, display a more specific message
This commit is contained in:
parent
d6e4ef793e
commit
0ecf679c7f
1 changed files with 4 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue