Getting UIDs of Additional Usergroups
I'm trying to get all the uids that belong to a particular usergroup which is fine if it's the user's primary usergroup but I'm having trouble matching their additional usergroups.

Can anyone provide some insight on how to get a list of uids using a gid including those users which have that group listed as an additional group?

Much appreciated.
Use the concat function in mySQL to query in additional usergroups:

SELECT * FROM mybb_users
WHERE CONCAT(',',additionalgroups,',') LIKE '%,".$fid.",%'

Will list all users that have $fid listed as an additional group.
Thanks a lot man, figured it out like 30 mins before I saw this. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)