using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.Office.Server.UserProfiles;
using Microsoft.Office.Server;
SPSite _site = new SPSite("http://server/");
ServerContext scontext = ServerContext.GetContext(_site);
SPUser memb = _site.OpenWeb().CurrentUser;
UserProfileManager upm = new UserProfileManager(scontext);
UserProfile up = upm.GetUserProfile(memb.LoginName);
MessageBox.Show(up["FirstName"].ToString() + up["LastName"].ToString());
Hope this will help.
we can get from Active directory also.
In this we are accessing only sharepoint user profile store
Showing posts with label User Profiles. Show all posts
Showing posts with label User Profiles. Show all posts
Wednesday, 2 April 2008
Subscribe to:
Posts (Atom)