public IActionResult LogOn(UsersLogOnModel model, String returnUrl) { var logOnError = model.TryLogOn(); if (logOnError == null) { return(String.IsNullOrEmpty(returnUrl) ? RedirectToAction("Index", "Accounts") : Redirect(returnUrl)); } if (logOnError.Type == Error.DisabledUser) { return(baseModelView("SendVerification")); } ModelState.AddModelError("", HttpContext.Translate(logOnError)); return(View(model)); }
public IActionResult LogOn() { var model = new UsersLogOnModel(); return(View(model)); }