From 2c04afa01bc193c92dd0c9916c06f49f1a756a00 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 12 Oct 2015 19:19:55 +0200 Subject: [PATCH] Also check user account status --- .../mxchange/addressbook/beans/login/UserLoginWebBean.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java index 04685760..9496db3d 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java @@ -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))); } } -- 2.39.5