Beispiel #1
0
 public ActionResult AccountRecovery(string token)
 {
     var model = new PasswordRecovery
     {
         Token = token
     };
     return View(model);
 }
Beispiel #2
0
        public ActionResult AccountRecovery(PasswordRecovery model)
        {
            if (ModelState.IsValid)
            {
                WebSecurity.ResetPassword(model.Token, model.NewPassword);
                ViewBag.Message = "Tu contraseña a sido cambiada";
            }
            else
            {
                ModelState.AddModelError("", "Verifica tus datos, ha ocurrido un error.");
            }

            return View(model);
        }