import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mxchange.addressbook.beans.user.UserWebController;
+import org.mxchange.jusercore.container.login.LoginContainer;
+import org.mxchange.jusercore.container.login.UserLoginContainer;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
+import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
import org.mxchange.jusercore.exceptions.UserStatusLockedException;
import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
import org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote;
// Get user instance
User user = this.userController.createUserInstance();
+ // Create login container
+ LoginContainer container = new UserLoginContainer(user, this.userController.getUserPassword());
+
try {
// Call bean
- User confirmedUser = this.loginBean.validateUserAccountStatus(user);
+ User confirmedUser = this.loginBean.validateUserAccountStatus(container);
// All fine here so set it here
this.setLoggedInUser(confirmedUser);
- } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException ex) {
+
+ // All fine
+ return "login"; //NOI18N
+ } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException | UserPasswordMismatchException ex) {
// Throw again
throw new FaceletException(ex);
}
-
- // All fine
- return "login"; //NOI18N
}
@Override