Check if an OS X user is an administrator? In a script, how can I check if user "Bill" is a member of the admin group (group 80)?

I plan to use this in a script to check if he is and if he is not, make him an admin user.
See the man page for id.

id -G user 


will output a space delimited list of groups for a particular user. You'd have to detect 80 in the output list.