Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.0
-
Fix Version/s: 4.1.3
-
Component/s: CiviCRM API
-
Labels:None
Description
Doing an Contact get query like
$params = array(
'version' => 3,
'check_permissions' => false,
'sort_name' => 'Some Name',
);
also returns deleted contacts. I guess
function _civicrm_api3_contact_get_spec(&$params)
sets the default api parameter to 0 so that only active contacts are shown. However, $params in civicrm_api3_contact_get( ) contains always an empty 'contact_is_deleted' value, it even remains empty if I set 'contact_is_deleted' in the api call to 0 or '0':
Array
(
[version] => 3
[check_permissions] =>
[sort_name] => Some Name
[contact_source] =>
[current_employer_id] =>
[contact_is_deleted] =>
)
Instead, the 'showAll' = 'active' sets 'contact_is_deleted' in civicrm_api3_contact_get( ) to 0, and the deleted contacts disappear.