@SessionScoped
public class JobsUserLoginWebSessionBean extends BaseJobsController implements JobsUserLoginWebSessionController {
+ /**
+ * Path name for guest base template
+ */
+ private static final String GUEST_BASE_TEMPLATE_NAME = "guest/guest"; //NOI18N
+
+ /**
+ * Path name for logged-in user base template
+ */
+ private static final String USER_BASE_TEMPLATE_NAME = "login/user/user"; //NOI18N
+
/**
* Serial number
*/
// All fine
return "login"; //NOI18N
- } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException | UserPasswordMismatchException ex) {
- // Throw again
- throw new FaceletException(ex);
+ } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException ex) {
+ // Show JSF message
+ this.showFacesMessage("form_user_login:userName", ex); //NOI18N
+ return ""; //NOI18N
+ } catch (final UserPasswordMismatchException ex) {
+ // Show JSF message
+ this.showFacesMessage("form_user_login:userPassword", ex); //NOI18N
+ return ""; //NOI18N
}
}
}
@Override
- public boolean isGuest () {
- return (!this.isUserLoggedIn());
+ public boolean ifUserMustChangePassword () {
+ return (this.isUserLoggedIn() && this.getLoggedInUser().getUserMustChangePassword());
}
@Override