dotnetnuke 添加用户属性 Profile

 if (DotNetNuke.Entities.Profile.ProfileController.GetPropertyDefinitionByName(this.PortalId, "QQ") == null)
            {
                DotNetNuke.Entities.Profile.ProfileController.AddPropertyDefinition(
                    new DotNetNuke.Entities.Profile.ProfilePropertyDefinition(this.PortalId)
                    {
                        PropertyName = "QQ",
                        DataType = new DotNetNuke.Common.Lists.ListController().GetListEntryInfo("DataType","Text").EntryID,                                                                                       
                        Length = 10,
                        PropertyCategory = "Contact"  , Visible=true    ,DefaultVisibility=DotNetNuke.Entities.Users.UserVisibilityMode.AllUsers
                    });
            }

你可能感兴趣的:(dotnetnuke)