sharepoint 中根据loginName获取displayName以及用户信息 .

//获取当前站点

SPServiceContext spservercontent = SPServiceContext.GetContext(site);

//获取UserProfileManager实例

 UserProfileManager upMan = new UserProfileManager(spservercontent);

使用GetUserProfile方法获取displayName

 userprofile = upMan.GetUserProfile(LoginName.ToString());

string displayName = userprofile.DisplayName;

原文地址:https://www.cnblogs.com/TNSSTAR/p/2929282.html