$user = JFactory::getUser();
$groups = $user->get('groups');
foreach($groups as $group) {
if ($group == xxxxx) {
break;
}
}