Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
        public ActionResult ResetPassword()
        {
            AccountResetPasswordVM model = new AccountResetPasswordVM();

            return(View(model));
        }