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