Try Now
More in this section

Forums / Developing with Sitefinity / Custom User Fields

Custom User Fields

1 posts, 0 answered
  1. Juan Sola
    Juan Sola avatar
    28 posts
    08 Jan 2007
    10 Jul
    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
1 posts, 0 answered