public override void Execute(int userID, DateTime instructDateTime, string datas)
        {
            MaxLabs.Passport.Proxy.DataForNewUser authUserProxy = DataReadWrap.Get <MaxLabs.Passport.Proxy.DataForNewUser>(datas);

            MaxLabs.bbsMax.PassportServerInterface.DataForNewUser data = new MaxLabs.bbsMax.PassportServerInterface.DataForNewUser();

            data.UserID          = authUserProxy.UserID;
            data.Email           = authUserProxy.Email;
            data.Username        = authUserProxy.Username;
            data.Password        = authUserProxy.Password;
            data.PasswordFormat  = authUserProxy.PasswordFormat;
            data.IPAddress       = authUserProxy.IPAddress;
            data.InviterID       = authUserProxy.InviterID;
            data.IsActive        = authUserProxy.IsActive;
            data.Gender          = authUserProxy.Gender;
            data.ExtendedFields  = new MaxLabs.bbsMax.PassportServerInterface.UserExtendedValueProxy[] {}; //new MaxLabs.bbsMax.PassportServerInterface.StringKeyValueProxy[0];// authUserProxy.ExtendedFields;
            data.Birthdat        = authUserProxy.Birthdat;
            data.AvatarSrc       = authUserProxy.AvatarSrc;
            data.AvatarUrl_120px = authUserProxy.AvatarUrl_120px;
            data.AvatarUrl_24px  = authUserProxy.AvatarUrl_24px;
            data.AvatarUrl_48px  = authUserProxy.AvatarUrl_48px;
            data.MobilePhone     = authUserProxy.MobilePhone;
            data.Realname        = authUserProxy.Realname;
            data.Signature       = authUserProxy.Signature;
            data.SignatureFormat = authUserProxy.SignatureFormat;
            data.TimeZone        = authUserProxy.TimeZone;

            UserBO.Instance.Client_Register(data);
        }
Exemple #2
0
        public static DataForNewUser GetDataForNewUser(AuthUser user)
        {

            if (user == null || user == User.Guest)
                return null;

            DataForNewUser userDataProxy = new DataForNewUser();
            ConvertUserProxy(userDataProxy, user);

            userDataProxy.GenderName = user.GenderName;
            userDataProxy.ExtendedFields = new List<UserExtendedValueProxy>();

            foreach (UserExtendedValue extendedValue in user.ExtendedFields)
            {
                userDataProxy.ExtendedFields.Add(GetUserExtendedValueProxy(extendedValue));
            }

            userDataProxy.IPAddress = user.LastVisitIP;
            userDataProxy.IsActive = user.IsActive;
            userDataProxy.Password = user.Password;
            userDataProxy.PasswordFormat = (int)user.PasswordFormat;
            userDataProxy.Signature = user.Signature;
            userDataProxy.SignatureFormat = (int)user.SignatureFormat;
            userDataProxy.TimeZone = user.TimeZone;
            userDataProxy.InviterID = user.InviterID;

            //getfriend

            FriendGroupCollection friendgroups = user.FriendGroups;
            userDataProxy.FriendGroups = new List<MaxLabs.Passport.Proxy.FriendGroupProxy>();

            foreach (FriendGroup fg in friendgroups)
            {
                MaxLabs.Passport.Proxy.FriendGroupProxy fgp = GetFriendGroupProxy(fg);
                userDataProxy.FriendGroups.Add(fgp);
                FriendCollection friends = FriendBO.Instance.GetFriends(user.UserID, fg.GroupID);

                foreach (MaxLabs.bbsMax.Entities.Friend friend in friends)
                {
                    fgp.Friends.Add(GetFriendProxy(friend));
                }
            }

            //getExtendedFields
            //userDataProxy.ExtendedFields = GetStringKeyValueList(user.ExtendedFields);

            return userDataProxy;
        }