Contact token should show contact's info instead of logged in contact
authorMonish Deb <monish.deb@jmaconsulting.biz>
Wed, 2 Mar 2022 09:52:11 +0000 (15:22 +0530)
committerMonish Deb <monish.deb@jmaconsulting.biz>
Wed, 2 Mar 2022 09:52:11 +0000 (15:22 +0530)
CRM/Mailing/BAO/Mailing.php

index 51157ae9bd7c529ec79976869da14d72c427d861..5b59f5329458f11341456db35d2a4f3e83d77079 100644 (file)
@@ -2860,7 +2860,7 @@ ORDER BY civicrm_mailing.name";
         CRM_Core_Action::VIEW => [
           'name' => ts('View'),
           'url' => 'civicrm/mailing/view',
-          'qs' => "reset=1&id=%%mkey%%",
+          'qs' => "reset=1&id=%%mkey%%&cid=%%cid%%&cs=%%cs%%",
           'title' => ts('View Mailing'),
           'class' => 'crm-popup',
         ],
@@ -2884,6 +2884,7 @@ ORDER BY civicrm_mailing.name";
           'mid' => $values['mailing_id'],
           'cid' => $params['contact_id'],
           'mkey' => $mailingKey,
+          'cs' => CRM_Contact_BAO_Contact_Utils::generateChecksum($params['contact_id'], NULL, 'inf'),
         ],
         ts('more'),
         FALSE,