Esempio 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();
 }
Esempio 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);
        }