Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5.5
-
Fix Version/s: 4.7.13
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
According to the docs, you should be able to permanently delete a contact through the API with 'skip_undelete' => 1. This works with API explorer but not with PHP. API explorer prompts for confirmation, which is not possible in PHP. 'check_permission' => 0 does not change the result.
The error is "CiviCRM_API3_Exception: Could not delete contact in civicrm_api3() (line 42 of /var/www/web/sites/all/modules/civicrm/api/api.php)."
The error goes away if "CiviCRM: delete contacts" permission is set for anonymous users.
For discussion see http://forum.civicrm.org/index.php/topic,35674.msg151660.html#msg151660