$count = FALSE,
$ignorePermission = FALSE,
$onlyPublicGroups = FALSE,
- $excludeHidden = TRUE
+ $excludeHidden = TRUE,
+ $groupId = NULL
) {
if ($count) {
$select = 'SELECT count(DISTINCT civicrm_group_contact.id)';
$where .= ' AND civicrm_group_contact.status = %2';
$params[2] = array($status, 'String');
}
+ if (!empty($groupId)) {
+ $where .= " AND civicrm_group.id = %3 ";
+ $params[3] = array($groupId, 'Integer');
+ }
$tables = array(
'civicrm_group_contact' => 1,
'civicrm_group' => 1,