SharePoint AllUsers vs SiteUsers vs Users

SharePoint中有三个表示用户列表的属性,但是msdn说得比较含糊,很容易让人混淆,在些做个记录

SPWeb.AllUsers – 目前对当前SharePoint web站点有访问权限的用户,包括直接加入到SharPoint 站点,以及曾经浏览过站点的非直接(通过SG或authenticated users的方式)加入站点的用户

SPWeb.SiteUsers – 所有曾经访问过当前站点集的用户

SPWeb.Users – 目前对当前SharePoint web站点有访问权限的用户,且必须是直接加入到SharPoint 站点中的

Web Service /_vti_bin/usergroup.asmx">/_vti_bin/usergroup.asmx">/_vti_bin/usergroup.asmx">http://<Site>/_vti_bin/usergroup.asmx 中有三个方法与以上属性相对应:

GetAllUserCollectionFromWeb - SPWeb.AllUsers

GetUserCollectionFromSite - SPWeb.SiteUsers

GetUserCollectionFromWeb - SPWeb.Users

参考:

http://netrsc.blogspot.se/2010/04/sharepoint-moss-2007-allusers-vs.html

http://stackoverflow.com/questions/7159646/getting-the-userinfo-from-specific-sharepoint-site-using-sharepoint-web-service

原文地址:https://www.cnblogs.com/ITHelper/p/3065540.html