08 Jan 2007
Link to this post
I followed the steps outlined here
as well as http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/adding-custom-attributes-to-users
I added a PhoneNumber, Region, Brand, and Comment field to the default user profile. All but Comment were short text type.
I basically copied the registration controller and registratioviewmodel code from the Feather github page and tweaked them for my purposes. For the normal fields in the SitefinityProfile class it's working fine. However calling DoesFieldExist on the profile instance with values of "PhoneNumber", "Region", "Brand" or "Comment" returns false. Attempting to set the values anyway fails with an error of type System.NotSupportedException: 'Type 'Telerik.Sitefinity.Security.Model.UserProfile' does not contain property with name 'PhoneNumber'.' I can set them manually in the admin screen so I know that they exist. I just can't seem to find a way to access them in a widget.
Is there something else I need to do? None of the code samples indicate any other actions or code that I might need to write.
We're running Sitefinity 10.0