I am attempting to update a custom profile property in a custom module I am building.
How do I call the stored procedure 'UpdateUserProfileProperty' from a class in the library via a class such as UserController?
I saw an example here: (http://www.dotnetnuke.com/Products/Development/Projects/ModuleXML/Forums/tabid/963/forumid/111/threadid/58226/scope/posts/threadpage/3/Default.aspx)
where it is suggested that I could use the following code:
Dim objUser As UserInfo = UserController.GetCurrentUserInfo()
objUser.Profile.SetProfileProperty("propertyname", "propertyvalue")
UserController.UpdateUser(PortalSettings.PortalId, objUser)
But the UpdateUser method does ot update the UserProfile table.
Any suggestions please?
NEVER MIND. I figured it out... seems like half the time I figure stuff out AFTER I place a post, even though I wracked my brain beforehand...
Anyway, in case it's useful to someone else, I did the following
Imports DotNetNuke.Entities.Profile
and then in your method
ProfileController.UpdateUserProfile(objUser)