public ActionResult Giris(KullaniciGirisModel girisModel) { if (ModelState.IsValid) { var KullaniciId = kullaniciYonetimi.KullaniciBul(girisModel.EPosta, girisModel.Sifre); if (!(KullaniciId.Count() == 0)) { var Kullanici = kullaniciYonetimi.LoginKullaniciModelBul(Convert.ToInt32(KullaniciId)); if (Convert.ToBoolean(Kullanici.AktifMi)) { Session["KullaniciId"] = KullaniciId; Session["Bilgi"] = Kullanici.KullaniciAdi + " " + Kullanici.KullaniciSoyadi; KullaniciBilgileriDondur.LogKaydet(6, "Koordinatör Girişi Yapıldı."); return(RedirectToAction("AnaSayfa", "Giris")); } else { TempData["hata"] = "Kullanıcı Aktif Değil. İl görevliniz ile iletişime geçiniz."; return(RedirectToAction("Giris", "Giris")); } } else { ModelState.AddModelError("", "E Posta veya Şifre Hatalı."); return(View(girisModel)); } } else { return(View(girisModel)); } }
public IActionResult GirisYap(KullaniciGirisModel model) { if (ModelState.IsValid == true) { var signInResult = _signInManager.PasswordSignInAsync(model.KullaniciAd, model.Sifre, model.BeniHatirla, false).Result; //true yapsaydık kullanıcı hatalı girişinde 5 dakka boyunca giremez gibi bie durumu yapabilirdik //isNotAllowed mail dogrulama, telefon dogrulama adımları gibi //isLockedAllowed kullanıcı kilitli mi değilmi //RequiresTwo factor ikili doğrulama //Succueeded başarılı olma işlemi if (signInResult.Succeeded) { return(RedirectToAction("Index", "Home", new { area = "Admin" })); } ModelState.AddModelError("", "Kullanıcı adı veya şifre hatalı"); } return(View(model)); }
public IActionResult Login(KullaniciGirisModel model) { return(View()); }