Skip to content

Commit

Permalink
[notification] Fix sender name in email (#9203)
Browse files Browse the repository at this point in the history
Display the name of the user instead of their ID in the notification emails.

Fixes #9202
  • Loading branch information
maximemulder authored Apr 16, 2024
1 parent 791b857 commit e96d5a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions php/libraries/NDB_Notifier.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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');
}
}
}
Expand Down

0 comments on commit e96d5a8

Please # to comment.