changelog for 7.5:
FEATURE It is now possible to add an image for each group. Users belonging to that group will be able to display that image next to their name. If a user belongs to multiple groups, the user can select a single or multiple images to be displayed.It's just hit the beta cycle, so won't be long before it will be released.
As far as the query goes:
should be replaced with
and (t1.GROUP_ID = 6 or t1.GROUP_ID = 7)
So you replace the original requirement with a bunch of them with or inbetween. But you group them together, because together they are one of the conditions).