or you can use a slightly larger, yet more accurate combination of:

GroupMembers() - returns all members of a given group
and
AScan() - Searches an array for an element containing the same value as an expression

where you use groupmembers to see if the userid in present, if not it adds it
and where you see if the group is present and if so, removes it
_________________________
How to ask questions the smart way <-----------> Before you ask