如何从Sharepoint 2010中的SocialProfile获取SPUser对象?

| 如何从Sharepoint 2010中的SocialProfile获取与配置文件关联的SPUser对象? 谢谢     
已邀请:
获取您链接的msdn文章中指定的用户登录名。 然后,由于给定站点的SharePoint用户(和组),请获取给定SPSite的用户:
SPWeb web = ...;
web.AllUsers[\"<loginName>\"];
或者如果您要创建用户(如果尚未退出):
web.EnsureUser(\"<loginName>\");
    
首先,获取所需用户的ID
UserProfile profile = GetProfile();
string userId = profile .MultiloginAccounts[0];
其次,从以下集合之一获取用户
web.AllUsers, web.Users or web.SiteUser
本文是关于差异http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/71d1c8e3-de32-4e3d-9f8c-7a9be13197f6/     

要回复问题请先登录注册