Beispiel #1
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="UID">用户编号</param>
        /// <returns>用户信息</returns>
        public UserInfo GetUserInfo(string UID)
        {
            //GetCache();
            UserInfo User = LocalLogin.GetUserInfo(UID);

            if (User == null)
            {
                EyouSoft.SSOComponent.SSORemote.UserInfo RemoteUser = RemoteLogin.GetUserInfo(UID);
                User = ConvertToUser(RemoteUser);
            }
            return(User);
        }
Beispiel #2
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="UID">用户编号</param>
        /// <returns>用户信息</returns>
        public SSOResponse GetUserInfo(string UID)
        {
            //GetCache();
            SSOResponse response = new SSOResponse();
            UserInfo    User     = LocalLogin.GetUserInfo(UID);

            if (User == null)
            {
                EyouSoft.SSOComponent.SSORemote.SSOResponse remoteresponse = RemoteLogin.GetUserInfo(UID);

                if (remoteresponse != null && !string.IsNullOrEmpty(remoteresponse.SSOScript))
                {
                    User = EyouSoft.Common.SerializationHelper.InvertJSON <UserInfo>(remoteresponse.SSOScript);
                    if (User != null)
                    {
                        LocalLogin.UpdateUserInfo(User);
                    }
                }
            }
            response.UserInfo = User;
            return(response);
        }