title: Check if a user is in a group
body: <p>I have a server running where I use php to run a bash script to verify certain information of a user. For example, I have a webhosting server set up, and in order to be able to add another domain to their account I want to verify if the user is actually a member of the 'customers' group. What would be the best way to do this?</p>
  
  <p>I have searched google, but all it comes up with is ways to check whether a user or a group exists, so google is not being a big help right now.</p>