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
                    });
            }

原文地址:https://www.cnblogs.com/pengfeiwang/p/4384993.html