Пример #1
0
        public ActionResult ResetPassword(ResetPasswordModel model) {
            if (ModelState.IsValid) {
                if (_membershipProvider.ResetPassword(model.ResetPasswordToken, model.NewPassword))
                    return RedirectToAction("Login");
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }
Пример #2
0
        public ActionResult ResetPassword(string token, bool cancel = false) {
            if (cancel)
                _membershipProvider.CancelPasswordReset(token);

            var model = new ResetPasswordModel { ResetPasswordToken = token, Cancelled = cancel };
            return View(model);
        }