CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Soft-deleted contacts in contact_get API
Pages: [1]

Author Topic: Soft-deleted contacts in contact_get API  (Read 824 times)

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Soft-deleted contacts in contact_get API
September 15, 2010, 06:45:37 am
When using the contact-get API I also get the soft-deleted contacts in my results. This leads me to a number of questions:
  • I would expect to have a parameter that I can set so I do or do not get soft-deleted contacts. I do not see such a parameter however, is that because I am not looking deep enough or should we stick this on the list for the sprint?
  • From a data management perspective: is there functionality to permanently delete soft-deleted contacts? I could not find it in the documentation. If there is, tell me and I will update the wiki  ;)
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Soft-deleted contacts in contact_get API
September 15, 2010, 08:33:14 am

most of the is_deleted stuff is handled by the permissioning code

the search API in specific bypasses the permissioning code, and hence returns all contacts

i'm pretty sure that the delete_contact API is a permanent deletion. Folks who have access to see deleted contacts have the permission to "permanently" delete a contact

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Soft-deleted contacts in contact_get API
September 15, 2010, 08:44:02 am
I'm afraid I have to correct you there  ;D
The contact_search API is deprecated, the contact_get API should be used (and apparently bypasses the permission code). I will add the addition of an option parameter to include or exclude soft_deleted contact on the list for the sprint API cleanup.
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Soft-deleted contacts in contact_get API

This forum was archived on 2017-11-26.