public bool CheckUser(string name, string ename) { var result = UserRepo.CheckUser(name, ename); if (result != null) { return(true); } else { return(false); } }
public ActionResult ForgotPassword(ForgotPasswordViewModel model) { if (ModelState.IsValid) { //kalo user ada maka update info user/ganti password var user = UserRepo.CheckUser(model); if (user != null) { if (UserRepo.Update2(user)) { //setelah update otomatis login SignInAsync(user.username); return(RedirectToAction("Index")); } } else { ModelState.AddModelError("", "Invalid Login"); } } return(PartialView(model)); }
public bool CheckUser(string UserName) { UserRepo obj = new UserRepo(); return(obj.CheckUser(UserName)); }
public bool?CheckUser(User u) { bool?reponse = _repo.CheckUser(u.toDal()); return(reponse); }