Exemplo n.º 1
0
        public async Task <ActionResult> Send(vm.RequestUserPasswordResetTicket info)
        {
            using (var scope = Database.CreateTransactionScope())
            {
                var user = await Domain.User.FindByEmail(info.Email.Trim());

                if (user == null)
                {
                    Notify("Invalid email address. Please try again.");
                    return(JsonActions(info));
                }

                await PasswordResetService.RequestTicket(user);

                ReplaceView("<h2> Forgot Your Password? </h2>\n                <p> An email containing instructions to change your password has been sent to your email address. </p>", htmlEncode: false);

                scope.Complete();
            }

            return(JsonActions(info));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Index(vm.RequestUserPasswordResetTicket info)
        {
            ModelState.Clear(); // Remove initial validation messages

            return(View(info));
        }