The query below will give you a list of users that belong to SharePoint 2007 groups. You can comment out and add DISTINCT to summarize the list if needed.
– Query to get all the SharePoint groups in a site collection
SELECT DISTINCT u.tp_Login, g.Title AS GroupTitle, w.FullUrl, w.SiteId, w.Id, w.Title, g.Description
FROM Groups g INNER JOIN
Webs w ON g.SiteId = w.SiteId
INNER JOIN GroupMembership gm ON gm.GroupId = g.ID
INNER JOIN UserInfo u ON u.tp_ID = gm.MemberId
Advertisement