Writing values to a Moss2007 user profileAugust 28, 2008 9:14
At the end it turned out to be very simple to update the values in a user profile: just update the value in the property and then do a Commit on the profile.
using (SPSite site = new SPSite(”http://sharepointsite”))
Tags: commit, property, user profile, web service.
{ UserProfileManager uPMgr = new UserProfileManager(ServerContext.GetContext(site)); UserProfile profile = uPMgr.GetUserProfile(”Administrator”); profile["WorkEmail"].Value = “newemail@address.com”; profile.Commit(); } |
||