Пример #1
0
        public static int GetCookieUserId()
        {
            int uid = 0;

            int.TryParse(DiscuzHelper.GetCookie("userid"), out uid);
            return(uid);
        }
Пример #2
0
        public static string GetCookieUserName()
        {
            if (IsDizLogin)
            {
                string username = DiscuzHelper.GetCookie("username");

                if (string.IsNullOrEmpty(username))
                {
                    username = DizUser.Username;
                    DiscuzHelper.WriteCookie("username", username);
                }
                return(username);
            }
            else
            {
                return(String.Empty);
            }
        }