0

I have been using this code for create ProfilePropertyDefinition:

ProfileController.AddPropertyDefinition(new ProfilePropertyDefinition(objUserInfo.PortalID) { PropertyName = propName, PropertyCategory = propCategory, DataType = 2, ReadOnly = false });

objUserInfo.PortalID is an int so I cant pass null here.

There is another way to create a PropertyDefinition with PortalID NULL?

Erick Lanford Xenes
  • 1,467
  • 2
  • 20
  • 34
  • I doubt it can be done with the ProfileController. But the table `ProfilePropertyDefinition` does accept NULL values, so maybe edit the database directly? – VDWWD Sep 05 '18 at 17:04

1 Answers1

1

This is not a supported process in the API as the actual profile information is associated on a per-portal basis.

DB architecture would allow it, but you would be going around the DNN API's to actually insert the values. Additionally, the DNN API would not extract the profile information for the user as it always uses the portal ID values.

Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173