From 98fc718032ed472906f8dae81269a00b3176ff15 Mon Sep 17 00:00:00 2001 From: PhilMB Date: Wed, 26 Jul 2023 20:10:40 -0500 Subject: [PATCH] code clean up ts variable method updated and OptOutURL removed --- CRM/Mailing/Form/Unsubscribe.php | 6 ++++++ templates/CRM/Mailing/Form/Unsubscribe.tpl | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CRM/Mailing/Form/Unsubscribe.php b/CRM/Mailing/Form/Unsubscribe.php index e5acb41922..cf17a06f0a 100644 --- a/CRM/Mailing/Form/Unsubscribe.php +++ b/CRM/Mailing/Form/Unsubscribe.php @@ -66,6 +66,12 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { list($displayName, $email) = CRM_Mailing_Event_BAO_MailingEventQueue::getContactInfo($queue_id); $this->assign('display_name', $displayName); + $nameMasked = ''; + $names = explode(' ', $displayName); + foreach ($names as $name) { + $nameMasked .= substr($name, 0, 2) . '***** '; + } + $this->assign('name_masked', $nameMasked); $emailMasked = CRM_Utils_String::maskEmail($email); $this->assign('email_masked', $emailMasked); $this->assign('email', $email); diff --git a/templates/CRM/Mailing/Form/Unsubscribe.tpl b/templates/CRM/Mailing/Form/Unsubscribe.tpl index 8dfedfa7db..99c70f8cb2 100644 --- a/templates/CRM/Mailing/Form/Unsubscribe.tpl +++ b/templates/CRM/Mailing/Form/Unsubscribe.tpl @@ -10,7 +10,7 @@
{if $groupExist}
- {ts}Are you sure you want to be removed from the mailing list(s) shown below:{/ts}
+ {ts 1=$name_masked}Are you sure you want to remove %1 from the mailing list(s) shown below:{/ts}
{counter start=0 skip=1 print=false} @@ -22,8 +22,7 @@ {/foreach}
-

{ts}You are requesting to unsubscribe this email address:{/ts}

-

{$email_masked}

+

{ts 1=$name_masked}You are requesting to unsubscribe all email addresses for %1 from the above mailing list.{/ts}

{ts}If this is your email address and you wish to unsubscribe please click the Unsubscribe button to confirm.{/ts}

-- 2.25.1