Code cleanup
[civicrm-core.git] / CRM / Report / Form.php
index 9892c29aa1ac7d3153950b3e579214b47fb72aee..409ad8323d998e402d8e824e6eb82e1ad03ea025 100644 (file)
@@ -3442,7 +3442,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
     $smartGroups = array_keys($groups['values']);
 
     $query = "
-       SELECT group_contact.contact_id as id
+       SELECT DISTINCT group_contact.contact_id as id
        FROM civicrm_group_contact group_contact
        WHERE group_contact.group_id IN (" . implode(', ', $filteredGroups) . ")
        AND group_contact.status = 'Added' ";