UserProfileManager pm = new UserProfileManager(SPServiceContext.Current);
UserProfile currentUserProfile = pm.GetUserProfile(loginName);
String mySiteURL= currentUserProfile.PersonalUrl.ToString();
SPSite site = new SPSite("http://someurl.com");
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
UserProfile currentUserProfile = profileManager.GetUserProfile(loginName);
This blog is to share my some sharepoint 2010 experience with you. very recently i have to contribute new sharepoint 2010 project n i hav learn a lot from that project, most of the source code in this blog are used in project.
Sunday, January 15, 2012
How to get user profile in sharepoint 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment