CRM-15443 - Exclude deceased contacts from EntityRef results
authorColeman Watts <coleman@civicrm.org>
Sat, 11 Oct 2014 19:16:55 +0000 (15:16 -0400)
committerColeman Watts <coleman@civicrm.org>
Sat, 11 Oct 2014 19:16:55 +0000 (15:16 -0400)
api/v3/Contact.php

index 7bf53b9fd8313f4b458e7b920543b0a2e711caca..bd8656691d6d6b36934a4969681b163062dbc78f 100644 (file)
@@ -976,6 +976,10 @@ function _civicrm_api3_contact_getlist_params(&$request) {
   if (!empty($request['input'])) {
     $request['params'][$request['search_field']] = $request['input'];
   }
+  // Exclude deceased contacts by default
+  if (!isset($request['params']['is_deceased'])) {
+    $request['params']['is_deceased'] = 0;
+  }
 }
 
 /**