예제 #1
0
 public ActionResult AccountRecovery(string token)
 {
     var model = new PasswordRecovery
     {
         Token = token
     };
     return View(model);
 }
예제 #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);
        }