Skip to content

Commit

Permalink
Merge pull request #11163 from mickadoo/CRM-21334-fire-hooks-on-conta…
Browse files Browse the repository at this point in the history
…ct-image-deletion

CRM-21334: Fire hooks on Contact Image Deletion
  • Loading branch information
eileenmcnaughton authored Jan 23, 2018
2 parents 6fa2a79 + 50fb017 commit 62d684a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CRM/Contact/BAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,11 +1046,12 @@ public static function deleteContactImage($id) {
if (!$id) {
return FALSE;
}
$query = "
UPDATE civicrm_contact
SET image_URL=NULL
WHERE id={$id}; ";
CRM_Core_DAO::executeQuery($query);

$contact = new self();
$contact->id = $id;
$contact->image_URL = 'null';
$contact->save();

return TRUE;
}

Expand Down

0 comments on commit 62d684a

Please sign in to comment.