public virtual ActionResult Login(LoginModel model) { ModelState.Clear(); if (model.DatabaseIssue == true) { model.ConfigFileMissing = bootstrapSettings.Value.ConfigFileMissing(); } return View(model); }
public virtual ActionResult LoginPost(LoginModel model) { if (!ModelState.IsValid) { return View(model); } var authenticated = Authenticator.AuthenticateAndLogin(model.Username, model.Password); if (authenticated) { return (model.DatabaseIssue ?? false) ? (ActionResult)RedirectToAction("Index", "Install") : Redirect(string.IsNullOrWhiteSpace(model.ReturnUrl) ? "~/" : model.ReturnUrl); } ModelState.AddModelError("", "Invalid username or password. Please try again."); return View(model); }
public virtual ActionResult Login(LoginModel model) { ModelState.Clear(); if (model.DatabaseIssue == true) { model.ConfigFileMissing = bootstrapSettings.Value.ConfigFileMissing(); } string error; if (!lazyDatabaseConnectionDetector.Value.CanConnect(out error)) { model.DatabaseConnectionIssue = true; model.DatabaseError = error; } return View(model); }
public virtual ActionResult Login(LoginModel model) { ModelState.Clear(); return View(model); }