Beispiel #1
0
 public IActionResult RecoverPassword(RecoverPasswordVM passwordVM)
 {
     try
     {
         int  id    = userBLL.CheckUserForPassword(passwordVM.Username, passwordVM.Email, passwordVM.FirstName, passwordVM.LastName);
         bool check = MailHelper.RecoverPasswordMail(passwordVM.Username, passwordVM.Email, id);
         if (check)
         {
             ViewBag.Check   = "success";
             ViewBag.Message = "E-mail adresinize link gönderildi.";
         }
         else
         {
             throw new Exception("Şuan da şifre yenileme linki gönderilemiyor. Daha sonra tekrar deneyiniz.");
         }
         return(View());
     }
     catch (Exception ex)
     {
         ViewBag.Message = ex.Message;
         return(View());
     }
 }