public ActionResult ResetPassword(ResetPasswordForm form) { if (ModelState.IsValid) { var user = _userService.GetUserByResetPasswordKey(form.ResetPasswordKey); if (user == null) return new HttpNotFoundResult(); _userService.ResetPassword(user, form.Password); FormsAuthentication.SetAuthCookie(user.UserName, true); return RedirectToAction("Index", "Home"); } return View(form); }
public ActionResult ResetPassword(Guid id) { var user = _userService.GetUserByResetPasswordKey(id); if (user == null) return new HttpNotFoundResult(); var form = new ResetPasswordForm(id); return View(form); }