//[CustomAuthorize("Login", "LogIn")] public ActionResult LogIn(LoginModel model) { try { LogAcesso(model.Login); var user = _usuarioApp.Login(model.Login, model.Password); if (user != null) { if (user.UltimoAcesso == null || user.CodigoRecover != null) { return(RedirectToAction("ChangePassword", new { @login = user.Login, @codRecover = user.CodigoRecover })); } SignInAsync(user, model.RememberMe); return(RedirectToAction("Index")); } ShowMessageDialog("Usuário e/ou senha inválidos", Message.MessageKind.Error); } catch (Exception exception) { ShowMessageDialog("Ocorreu um erro ao tentar efetuar login!", exception); } return(View("Index")); }