More in this section

Forums / Developing with Sitefinity / GetUserProfile or CreateProfile

GetUserProfile or CreateProfile

1 posts, 0 answered
  1. Pierre Alain
    Pierre Alain avatar
    38 posts
    10 Jun 2008
    27 Apr 2012
    Link to this post
    I have created a custom profile. Up until now, I was using GetUserProfile, with the type of our profile to get the profile and set properties.

    On a new widget which has some code running after the user first login, I use GetUserProfile and when I try to SetValue, I get an exception. I've replaced the call with CreateProfile and it works fine. Made the change in other place, but now when I tried deleting a user, it won't delete, telling me the user has more than one instance of the profile.

    Clearly, I dont understand something. Is the custom profile created automatically or do I have to create it? How do I check if a custom profile exist for a user?(GetUserProfile does not return null)
1 posts, 0 answered