I am trying to get a group id of currently logged in user
function search_civicrm_preProcess($formName, &$form) {
$getContactId = (int) CRM_Core_Session::singleton()->getLoggedInContactID();
$query = "select 'group_id' from 'civicrm_group_contact' where contact_id ='.$getContactId'";
$dao1 =& CRM_Core_DAO::executeQuery( $query, CRM_Core_DAO::$_nullArray );
}