Skip to content

Commit

Permalink
fix(emailTemplate): use instance Name instead of Url in subject
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf committed Feb 10, 2025
1 parent 9c3ef8e commit 636d2a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/settings/lib/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function onChangeEmail(IUser $user, $oldMailAddress) {
->setType('personal_settings')
->setAffectedUser($user->getUID());

$instanceName = $this->defaults->getName();
$instanceUrl = $this->urlGenerator->getAbsoluteURL('/');
$language = $this->languageFactory->getUserLanguage($user);
$l = $this->languageFactory->get('settings', $language);
Expand Down Expand Up @@ -159,7 +160,7 @@ public function onChangeEmail(IUser $user, $oldMailAddress) {
'instanceUrl' => $instanceUrl,
]);

$template->setSubject($l->t('Email address for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl]));
$template->setSubject($l->t('Email address for %1$s changed on %2$s', [$user->getDisplayName(), $instanceName]));
$template->addHeader();
$template->addHeading($l->t('Email address changed for %s', [$user->getDisplayName()]), false);
$template->addBodyText($text . ' ' . $l->t('If you did not request this, please contact an administrator.'));
Expand Down

0 comments on commit 636d2a4

Please sign in to comment.