From 456b21554bd28eb906bf6b22fb107dcb0d93bf5d Mon Sep 17 00:00:00 2001 From: Maxime Mulder Date: Thu, 11 Apr 2024 14:22:35 -0400 Subject: [PATCH 1/2] fix email notification sender name --- php/libraries/NDB_Notifier.class.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/php/libraries/NDB_Notifier.class.inc b/php/libraries/NDB_Notifier.class.inc index 1b6dd8257c7..b95def98fe9 100644 --- a/php/libraries/NDB_Notifier.class.inc +++ b/php/libraries/NDB_Notifier.class.inc @@ -86,9 +86,10 @@ class NDB_Notifier extends NDB_Notifier_Abstract { foreach ($this->notified['email_text'] as $name=>$uid) { $notifierID = $this->notifier->getId(); + $senderName = $this->notifier->getUsername(); $senderEmail = $this->notifier->getEmail(); $this->tpl_data['notified_user'] = $name; - $this->tpl_data['notifier_user'] = "$notifierID <$senderEmail>"; + $this->tpl_data['notifier_user'] = "$senderName <$senderEmail>"; $recipientEmail = $this->getEmail((int)$uid); if ($notifierID === $uid) { @@ -99,7 +100,8 @@ class NDB_Notifier extends NDB_Notifier_Abstract $this->template, $this->tpl_data ); - $this->log((int)$notifierID, (int)$uid, 'email_text'); + + $this->log($notifierID, (int)$uid, 'email_text'); } } } From 60c432a9fddfbf50a777f898b79eee56d0d818c9 Mon Sep 17 00:00:00 2001 From: Maxime Mulder Date: Thu, 11 Apr 2024 14:38:50 -0400 Subject: [PATCH 2/2] use fullname --- php/libraries/NDB_Notifier.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/libraries/NDB_Notifier.class.inc b/php/libraries/NDB_Notifier.class.inc index b95def98fe9..00a017837ac 100644 --- a/php/libraries/NDB_Notifier.class.inc +++ b/php/libraries/NDB_Notifier.class.inc @@ -86,7 +86,7 @@ class NDB_Notifier extends NDB_Notifier_Abstract { foreach ($this->notified['email_text'] as $name=>$uid) { $notifierID = $this->notifier->getId(); - $senderName = $this->notifier->getUsername(); + $senderName = $this->notifier->getFullname(); $senderEmail = $this->notifier->getEmail(); $this->tpl_data['notified_user'] = $name; $this->tpl_data['notifier_user'] = "$senderName <$senderEmail>";