|
Apr
12
|
1: UserProfile u;
2: u[property].Value = "My string";
3: u.Commit();
1: SPSecurity.RunWithElevatedPrivileges(delegate()
2: {
3: using (SPSite site = new SPSite(web.Site.ID))
4: {
5: // your code
6: }
7: });
1: try
2: {
3: if (profileManager.UserExists("MOSS\\andy"))
4: {
5: //Do something
6: }
7: }
8: catch (UserNotFoundException ex)
9: {
10: //Do something
11: }