Ejemplo n.º 1
0
 public ActionResult ForgetPassword(string key)
 {
     ForgetPasswordRequest req = _forgetPasswordRequestService.GetValidRequest(key);
     if (req != null)
     {
         ForgotPasswordModel model = new ForgotPasswordModel();
         model.UserAccountID = req.UserProfileID;
         return View(model);
     }
     return new EmptyResult();
 }
Ejemplo n.º 2
0
        public ActionResult ForgetPassword(ForgotPasswordModel model)
        {
            if (ModelState.IsValid)
            {
                if (_userAccountService.ChangePassword(model.UserAccountID, model.Password))
                {
                    _forgetPasswordRequestService.InvalidateRequest(model.UserAccountID);
                }

                return RedirectToAction("Login");
            }
            return View(model);
        }