コード例 #1
0
        public async Task <IActionResult> ForgotPassword(string Email)
        {
            if (!string.IsNullOrEmpty(Email))
            {
                AppAdmin appAdmin = await _db.Users.FirstOrDefaultAsync(x => x.Email == Email);

                if (appAdmin != null)
                {
                    SendMail mail = new SendMail();
                    mail.ForgotPassword(appAdmin);
                    TempData["Success"] = "Zəhmət olmasa E-Poçt ünvanını yoxlayın";
                    return(RedirectToAction("login", "users"));
                }
            }
            TempData["Success"] = "Yanlış E-Poçt";
            return(View());
        }