Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15980

API does not permit PHP to permanently delete a contact

    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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              robinhood Rob Scott
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: