Exemplo n.º 1
0
        /// <summary>
        ///     退出登录
        /// </summary>
        public static void AllLoginOut()
        {
            //清除SESSION
            LoginOut();

            //清除cookies
            UserCookies.clearCookies(UserCookies.ACTIVECOOKIESNAME);
            UserCookies.clearCookies(UserCookies.AUTHCOOKIENAME);
        }
Exemplo n.º 2
0
        private static decimal GetUserIdFromCookie()
        {
            decimal uid;

            if (UserState.getIsNeedActived())
            {
                string strUid = UserCookies.getActiveCookies(UserCookies.ACTIVECOOKIE_NAME_USERID);
                decimal.TryParse(strUid, out uid);
                return(uid);
            }

            string authuid = UserCookies.getAuthCookie(UserCookies.AUTHCOOKIE_NAME_USERID);

            decimal.TryParse(authuid, out uid);
            return(uid);
        }
Exemplo n.º 3
0
        /**
         * 是否已经登录UC
         */

        public static bool getIsUcLogin()
        {
            return(UserCookies.getAuthCookie(UserCookies.AUTHCOOKIE_NAME_USERID) != null);
        }
Exemplo n.º 4
0
        /**
         * 是否已经激活
         */

        public static bool getIsNeedActived()
        {
            return(!string.IsNullOrEmpty(UserCookies.getActiveCookies(UserCookies.ACTIVECOOKIE_NAME_USERID)));
        }
Exemplo n.º 5
0
        /**
         * 是否已经完善安全资料
         */

        public static string getIsSafeComplate()
        {
            return(UserCookies.getAuthCookie(UserCookies.AUTHCOOKIE_NAME_ISSAFLECOMPLATE));
        }