I am trying to update some custom profile properties programmatically via an ajax
call. When the ajax fires, the property gets the new value, then I refresh the page and the new property is displayed. However it is not saved in the database [dbo.UserProfile]
. If I clear the cache
, then the old value re-appears.
Here is the code of my web method:
Dim oProfileUserInfo As UserInfo = UserController.Instance.GetUserById(PortalSettings.PortalId, ProfileUserID)
oProfileUserInfo.Profile.SetProfileProperty("myproperty", "new value")
UserController.UpdateUser(PortalSettings.PortalId, oProfileUserInfo, True, False)
I'm using DNN 8.0.4
Any ideas?