2 => $mainId,
);
$activity = civicrm_api3('activity', 'create', array(
+ 'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
+ $mainId,
'subject' => ts('Contact ID %1 has been merged and deleted.', $params),
'target_contact_id' => $mainId,
'activity_type_id' => 'Contact Merged',
));
if (civicrm_api3('Setting', 'getvalue', array('name' => 'contact_undelete', 'group' => 'CiviCRM Preferences'))) {
civicrm_api3('activity', 'create', array(
+ 'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
+ $otherId,
'subject' => ts('Contact ID %1 has been merged into Contact ID %2 and deleted.', $params),
'target_contact_id' => $otherId,
'activity_type_id' => 'Contact Deleted by Merge',