コード例 #1
0
        bool IAccountService.ResetPassword(ResetPasswordModel model)
        {
            var password = this.CreatePassword(model.Email);

            if (password != null)
            {
                string verifyUrl = "/Account/VerifyPassword/" + password;
                this.emailHelper.SendPasswordMail(model.Email, verifyUrl);
                return true;
            }
            return false;
        }
コード例 #2
0
 public virtual ActionResult ResetPassword(ResetPasswordModel model)
 {
     try
     {
         if (this.accountService.ResetPassword(model))
         {
             return PartialView(Views.Password._ForgotPasswordSuccess, model);
         }
     }
     catch (Exception x)
     {
         ModelState.AddModelError("", "We had a problem sending your password. Please contact us through the help page.");
         this.emailHelper.SendErrorEmail(x as Exception);
     }
     return PartialView(Views.Password._ForgotPassword, model);
 }