Esempio n. 1
0
        public static UserMemberInfo GetUser(HttpRequestBase request)
        {
            long id = UserCookieEncryptHelper.Decrypt(WebHelper.GetCookie("Himall-User"), "2");

            if (id == 0L)
            {
                string userIdCookie = request.QueryString["token"];
                id = UserCookieEncryptHelper.Decrypt(userIdCookie, "2");
                if (id != 0L)
                {
                    WebHelper.SetCookie("Himall-User", userIdCookie);
                }
            }
            if (id != 0L)
            {
                return(MemberApplication.GetUserByCache(id));
            }
            return(null);
        }