protected override void Initialize(System.Web.Routing.RequestContext requestContext) { base.Initialize(requestContext); ViewModel.ErrorDisplay = ErrorDisplay; ViewModel.AppUserState = AppUserState; busUser = CodePasteFactory.GetUser(); }
/// <summary> /// Validates a user and returns the user entity as a result or fails /// and throws a SOAP exception to fail the request. /// </summary> /// <param name="email"></param> /// <param name="password"></param> /// <returns></returns> private User ValidateUser(string email, string password) { busUser busUser = CodePasteFactory.GetUser(); User user = busUser.ValidateUserAndLoad(email, password); if (user == null) { this.ThrowException(busUser.ErrorMessage); } return(user); }