Exemplo n.º 1
0
        public ActionResult Login()
        {
            string accountId = AppCookieHelper.Get <string>();

            if (!string.IsNullOrEmpty(accountId))
            {
                return(RedirectToAction("Index", "Dashboard"));
            }

            return(View());
        }
Exemplo n.º 2
0
        public UserAuthenticated GetUserAuth()
        {
            string strUserId = AppCookieHelper.Get <string>();

            if (string.IsNullOrEmpty(strUserId))
            {
                return(null);
            }

            Guid userId = Guid.Parse(strUserId);

            TUser user = GetUserById(userId);

            return(GetUserAuth(user));
        }