private bool SetLogin() { AuthUser au = new AuthUser(db); ViewBag.User = au.Authorise(); return(ViewBag.User != null); }
public ActionResult Login(UserViewModels.Login model) { AuthUser aa = new AuthUser(db); bool success = aa.Login(model.EmailAddress, model.Password); if (success) { return(RedirectToAction("Details", aa.Authorise())); } else { ModelState.AddModelError("EmailAddress", "That email and password combination was not recognised"); return(View()); } }