# Updating users in SharePoint 2010

I'm trying to update my user profile programmatically, but I get an error saying only an administrator can update that field. I am the administrator on my laptop, where I am running SharePoint on Windows 7. Can someone tell me how I can get SharePoint to know that I am the administrator so I can update my and other profiles? I've checked SharePoint and I'm listed as the owner of the site. Also, if there is a way to update these things in the interface, I'd be glad to do that instead of code.

using (SPSite site = new SPSite(SPContext.Current.Web.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPServiceContext context = SPServiceContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
string sAccount = "Wanna\\be";
UserProfile u = profileManager.GetUserProfile(sAccount);
u[PropertyConstants.HomePhone].Value = "9999999999";
u[PropertyConstants.CellPhone].Value = "9999999999";
u[PropertyConstants.FirstName].Value = "Wanna";
u[PropertyConstants.LastName].Value = "Be";
u[PropertyConstants.WorkEmail].Value = "wannabe@mycompany.com";
u.Commit();
}
}

-