Some progress on auth logic and cleanup of User class

This commit is contained in:
Ziver Koc 2017-11-13 16:34:13 +01:00
parent 58d4ab2f75
commit 26ab7c9dd9
12 changed files with 370 additions and 110 deletions

View file

@ -31,7 +31,7 @@ public class RegisterAction extends ZalleryAction{
msgs.add(MessageType.ERROR, "Please provide a valid email!");
return;
}
if( User.emailExists(request.getParameter("email"), db) ){
if(User.load(db, request.getParameter("email")) != null){
msgs.add(MessageType.ERROR, "An account with that email already exists!");
return;
}