From e96d5a83bd843e4d6852436e9287f987a6b009a7 Mon Sep 17 00:00:00 2001 From: Maxime Mulder Date: Tue, 16 Apr 2024 10:57:24 -0400 Subject: [PATCH] [notification] Fix sender name in email (#9203) Display the name of the user instead of their ID in the notification emails. Fixes #9202 --- 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..00a017837ac 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->getFullname(); $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'); } } }