Lets look at an example -
ServerContext siteContext = ServerContext.GetContext(siteCollection);
UserProfileManager oUserProfileManager = new UserProfileManager(siteContext);
UserProfile oUserProfile = oUserProfileManager.GetUserProfile(_spUser.LoginName);
foreach (Colleague colleague in oUserProfile.Colleagues.GetItems())
{
//Get colleagues
}
Ads by Google
No comments:
Post a Comment