]> git.mxchange.org Git - addressbook-war.git/commitdiff
Also check user account status
authorRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 17:19:55 +0000 (19:19 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 17:19:55 +0000 (19:19 +0200)
src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java

index 04685760075a3e7b18ba48c9784e7ebe75fff671..9496db3d558bb965bb84c0ff51950cd39e2cab7b 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.addressbook.beans.login;
 
+import java.util.Objects;
 import javax.enterprise.context.SessionScoped;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
@@ -29,6 +30,7 @@ import org.mxchange.jusercore.exceptions.UserStatusLockedException;
 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
 import org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
 /**
  * A web bean for user registration
@@ -109,6 +111,6 @@ public class UserLoginWebBean implements UserLoginWebController {
        @Override
        public boolean isUserLoggedIn () {
                // Compare instance
-               return (this.getLoggedInUser() instanceof User);
+               return ((this.getLoggedInUser() instanceof User) && (Objects.equals(this.getLoggedInUser().getUserAccountStatus(), UserAccountStatus.CONFIRMED)));
        }
 }