Skip to content
Snippets Groups Projects
Commit b49d6157 authored by david's avatar david
Browse files

set correct contact is in participant searches

parent 2b9fdf91
No related branches found
No related tags found
1 merge request!128set correct contact ID in participant searches
......@@ -25,7 +25,17 @@ class CRM_DataprocessorSearch_Form_ParticipantSearch extends CRM_DataprocessorSe
* @return false|string
*/
protected function link($row):? string {
return CRM_Utils_System::url('civicrm/contact/view/participant', 'reset=1&id='.$row['id'].'&cid='.$row['id'].'&action=view');
$contact_id = false;
try {
$contact_id = civicrm_api3('Participant', 'getvalue', [
'return' => 'contact_id',
'id' => $row['id']
]);
} catch (CiviCRM_API3_Exception $ex) {
// Do nothing.
}
return CRM_Utils_System::url('civicrm/contact/view/participant', 'reset=1&id='.$row['id'].'&cid='.$contact_id.'&action=view');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment