User Information List- SharePoint中隐藏的用户列表
User Information List存储用户的一些元数据, 名字, job title, department等.
某站点集中, 当一个用户被赋予权限时, 一个新的item就会被增加到User Information List上, 存储关于这个用户的一些信息.
这个列表是隐藏的, 要访问这个列表, 你可以使用如下的两个URL, 当然, 你必须是站点集的管理员才能看到这个列表.
http://localhost/_catalogs/users/simple.aspx
或
http://localhost/_catalogs/users/detail.aspx
这个列表的信息来自内容数据库的alluserdata表. 捞取数据的SQL语句如下:
SELECT TOP 101 t1.[Type] AS c0,
userdata.[nvarchar3],
t1.[ScopeId] AS c2,
userdata.[nvarchar8],
userdata.[tp_ID],
userdata.[nvarchar4],
userdata.[nvarchar5],
userdata.[nvarchar9],
userdata.[tp_Created],
CASE
WHEN Datalength(t1.dirname) = 0 THEN t1.leafname
WHEN Datalength(t1.leafname) = 0 THEN t1.dirname
ELSE t1.dirname + N'' / '' + t1.leafname
END AS c1,
userdata.[nvarchar1],
userdata.[tp_ModerationStatus],
userdata.[tp_Level]
FROM userdata
INNER MERGE JOIN docs AS t1 WITH(nolock)
ON ( 1 = 1
AND userdata.[tp_RowOrdinal] = 0
AND t1.siteid = userdata.tp_siteid
AND t1.siteid = @L2
AND t1.dirname = userdata.tp_dirname
AND t1.leafname = userdata.tp_leafname
AND t1.LEVEL = userdata.tp_level
AND t1.iscurrentversion = 1
AND ( 1 = 1 ) )
WHERE ( userdata.tp_iscurrent = 1 )
AND userdata.tp_siteid = @L2
AND ( userdata.tp_dirname = @DN )
AND userdata.tp_rowordinal = 0
AND ( ( userdata.[bit3] = 0 )
AND ( userdata.[bit4] = 1 )
AND t1.siteid = @L2
AND ( t1.dirname = @DN ) )
ORDER BY t1.[Type] DESC,
userdata.[nvarchar1] ASC,
userdata.[tp_ID] ASC
OPTION (FORCE ORDER)
注意, 这里的userdata.[bit3], 它是一个用户是否已经被删除了的标志.
在站点里删除一个用户, 这个用户的记录还会存在于站点中, 不过是它的bit3这个标志位会被置1, 标示它已经被删除了.
所以, 删除了的用户bit3是1, 于是他不会出现在这个隐藏的user information list列表中.
若要彻底删除一个用户, 即置bit3为1,可以进入下面的链接, X为user的ID. 你可以在网页中该用户上点右键, 查看链接, 即可获得这个user的ID.
http://servername/_layouts/useredit.aspx?ID=X
或者遵循下面的步骤来将用户从站点集上永久删除, 用户的alert也会被永久删除.
On the site collection home page, click the Site Actions menu, point to Site Settings, and then click People and Groups.
- On the People and Groups page, in the Quick Launch, click All People.
- On the People and Groups: All People page, select the check box next to the user who you want to delete.
- On the Actions menu, click Delete Users from Site Collection, and then click OK.
用户被永久删除之后, 如果再从AD里把这个用户删掉, 那么People Picker也搜不出来了这个人了. 呵呵.
注意: 每个站点集, 仅有一个User Information List.
内容来源:
User Profiles and User Information List Synchronization