Skip to content

Instantly share code, notes, and snippets.

@icetee
Last active June 26, 2021 20:34
Show Gist options
  • Save icetee/474f64094c7ba2ccd29a362e365a6cf2 to your computer and use it in GitHub Desktop.
Save icetee/474f64094c7ba2ccd29a362e365a6cf2 to your computer and use it in GitHub Desktop.
Hotfix for CiviCRM contact_type Organization filter and disable "factory" contact
--- web/app/plugins/civicrm/civicrm/CRM/Profile/Selector/Listings.php
+++ Listings.php
@@ -451,6 +451,8 @@
$additionalWhereClause = 'contact_a.is_deleted = 0';
+ $extraWhereClause = 'contact_a.contact_type = "Organization" AND contact_a.id != 1';
+
if ($extraWhereClause) {
$additionalWhereClause .= " AND {$extraWhereClause}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment