Andrei asked this question · 1,916 karma · Feb 15 '12 at 03:59 PM
does anyone has a SQL handy to run and get a list of users belonging to the same group?
thanks in advance
- potentially span across directories
- get their emails, etc as well
SELECT DISTINCT u.first_name, u.last_name, u.email_address, u.user_name FROM `cwd_membership` m INNER JOIN `cwd_user` u ON m.child_id = u.id WHERE `parent_id` IN ( SELECT id FROM `cwd_group` WHERE group_name LIKE 'ABC%' ) AND membership_type LIKE 'GROUP_USER'