Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public IActionResult LogOn()
        {
            var model = new UsersLogOnModel();

            return(View(model));
        }