public static function get_by_user_id($id) { $result = array(); $instance = new CRM_Civisocial_DAO_CivisocialUser(); $instance->facebook_user_id = $id; $instance->find(); while ($instance->fetch()) { $row = array(); $instance->storeValues($instance, $row); $result[$row['id']] = $row; } return $result; }
/** * Returns the list of fields that can be exported * * @param bool $prefix * * @return array */ static function &export($prefix = false) { if (!self::$_export) { self::$_export = array(); $fields = self::fields(); foreach ($fields as $name => $field) { if (CRM_Utils_Array::value('export', $field)) { if ($prefix) { self::$_export['al_user'] =& $fields[$name]; } else { self::$_export[$name] =& $fields[$name]; } } } } return self::$_export; }