How can I access the CiviCRM contact record 'group' value(s) of the current user? The unique key is email address. Perhaps there is a CiviCRM API?

EDIT

There is a CiviCRM API. My code so far:

civicrm_initialize();
$content = civicrm_api('contact', 'getvalue', array(
  'email' =&gt; $GLOBALS['user']-&gt;mail,
  'version' =&gt; 3,
  'return' =&gt; 'first_name')
);


I need the user's group, not first name.
You can even use 'email' api to get the contact id(as you have the email address in $GLOBALS['user']->mail) and then use 'GroupContact' api as above to get the groups record.

$result = civicrm_api3('Email', 'get', array(
  'sequential' =&gt; 1,
  'return' =&gt; "contact_id",
  'email' =&gt; $GLOBALS['user']-&gt;mail,
));