public ActionResult ResetPassword(AccountResetPasswordVM model) { UsersService usersService = new UsersService(); User user = usersService.GetAll().FirstOrDefault(u => u.Email == model.Email); if (user == null) { ModelState.AddModelError(String.Empty, "Invalid email address."); } if (!ModelState.IsValid) { return(View(model)); } Task.Run(() => EmailService.SendEmail(user, ControllerContext)); return(View("WaitForConfirmation")); }
public ActionResult ResetPassword() { AccountResetPasswordVM model = new AccountResetPasswordVM(); return(View(model)); }