This feels like something that should almost be a verb token...

I was wondering if anyone had an elegant way to test if a DN is in the
group membership list? All the approaches I can think of are fairly
brute force. Read back the list to a nodeset, for-each through it,
compare the current-value to the DN.

There has to be a more elegant way.

If it were a verb token, a cool feature I would like to see is the
ability to specify which of the 4 group membership related attributes
(or all) you test on. (Even cooler would be an option to fix any
missing ones!)