Return from getACLRoles when contactID is null
[civicrm-core.git] / CRM / ACL / BAO / ACL.php
index 64e5bc6e71886a5f328514cc65ec85dfc451ee11..5927b87753378868dc8b5afb4e5a2650eabd9033 100644 (file)
@@ -122,7 +122,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
     $where = ['acl.entity_table = "civicrm_acl_role" AND acl.entity_id IN (' . implode(',', array_keys(CRM_Core_OptionGroup::values('acl_role'))) . ')'];
 
     if (!empty($contact_id)) {
-      $where[] = " acl.entity_table  = 'civicrm_contact' AND acl.is_active = 1 AND acl.entity_id = $contact_id";
+      return [];
     }
 
     $results = [];