Пример #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"));
        }
Пример #2
0
        public ActionResult ResetPassword()
        {
            AccountResetPasswordVM model = new AccountResetPasswordVM();

            return(View(model));
        }