Пример #1
0
        void UserBO_OnUserExtendFieldChanged(ExtendedFieldCollection extendedFields)
        {
            ExtendedFieldProxy[] fields = new ExtendedFieldProxy[extendedFields.Count];

            int i = 0;

            foreach (ExtendedField field in extendedFields)
            {
                fields[i] = ProxyConverter.GetExtendedFieldProxy(field);
                i++;
            }

            CreateInstruct(0, InstructType.Setting_UpdateUserExtendedField, fields);
        }
Пример #2
0
        public PassportInfoProxy Passport_GetInfo()
        {
            string urlStart, urlEnd;

            switch (AllSettings.Current.FriendlyUrlSettings.UrlFormat)
            {
            case UrlFormat.Folder:
                urlStart = string.Empty;
                urlEnd   = string.Empty;
                break;

            case UrlFormat.Aspx:
                urlStart = string.Empty;
                urlEnd   = ".aspx";
                break;

            case UrlFormat.Html:
                urlStart = string.Empty;
                urlEnd   = ".html";
                break;

            default:
                urlStart = "?";
                urlEnd   = string.Empty;
                break;
            }

            PassportInfoProxy passportInfo = new PassportInfoProxy();

            passportInfo.RegisterUrl        = string.Concat(urlStart, "register", urlEnd);
            passportInfo.RecoverPasswordUrl = string.Concat(urlStart, "recoverpassword", urlEnd); //BbsRouter.GetUrl("recoverpassword");
            passportInfo.LogoutUrl          = string.Concat(urlStart, "logout", urlEnd);          //BbsRouter.GetUrl("logout");
            passportInfo.LoginUrl           = string.Concat(urlStart, "login", urlEnd);           //BbsRouter.GetUrl("login");

            passportInfo.SettingAvatarUrl      = string.Concat(urlStart, "my/avatar", urlEnd);
            passportInfo.SettingPrlofileUrl    = string.Concat(urlStart, "my/setting", urlEnd);
            passportInfo.SettingPasswordUrl    = string.Concat(urlStart, "my/changepassword", urlEnd);
            passportInfo.SettingChangeEmailUrl = string.Concat(urlStart, "my/changeemail", urlEnd);
            passportInfo.SettingNotifyUrl      = string.Concat(urlStart, "my/notify-setting", urlEnd);

            passportInfo.CenterUrl       = string.Concat(urlStart, "my/default", urlEnd);
            passportInfo.CenterNotifyUrl = string.Concat(urlStart, "my/notify", urlEnd);
            passportInfo.CenterChatUrl   = string.Concat(urlStart, "my/chat", urlEnd);
            passportInfo.CenterFriendUrl = string.Concat(urlStart, "my/friends", urlEnd);

            passportInfo.AvatarGeneratorUrl  = string.Concat(urlStart, "my/avatar", urlEnd);
            passportInfo.EnablePhoneValidate = AllSettings.Current.PhoneValidateSettings.Open;
            passportInfo.EnableRealnameCheck = AllSettings.Current.NameCheckSettings.EnableRealnameCheck;

            passportInfo.ExtendedFields = new List <ExtendedFieldProxy>();

            foreach (ExtendedField field in AllSettings.Current.ExtendedFieldSettings.Fields)
            {
                passportInfo.ExtendedFields.Add(ProxyConverter.GetExtendedFieldProxy(field));
            }


            passportInfo.CookieName = UserBO.cookieKey_User;

            return(passportInfo);
        }