@SpringBean private LoginServiceIfc loginService;
@DefaultHandler
public Resolution login(){
UserCredentialIfc userCredential=null;
userCredential = this.loginService.validateCredentials(this.userName, this.password);
if(userCredential != null){
//Check if the account has been locked by the admin
if(! userCredential.isActive()){
this.getContext().logout();
return new ForwardResolution("/WEB-INF/pages/_account_locked.jsp");
}
this.getContext().setUser(userCredential);
return new ForwardResolution("/WEB-INF/pages/home.jsp");