Then why don't you use INGROUP()? That would be much faster than enumerating all groups a user is member of. You might want to also show us the code you have so we can assist you more effectively.
_________________________
There are two types of vessels, submarines and targets.