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

posted @ 2015-04-01 19:42  王鹏飛  阅读(162)  评论(0编辑  收藏  举报