From: Roland Haeder Date: Mon, 12 Oct 2015 17:19:55 +0000 (+0200) Subject: Also check user account status X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c04afa01bc193c92dd0c9916c06f49f1a756a00;p=jfinancials-war.git Also check user account status --- 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))); } }