diff options
author | Joas Schilling <coding@schilljs.com> | 2017-09-15 10:59:11 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-10-18 15:12:03 +0200 |
commit | 8b37fe7f6534ad16bd9a357036e95e748e2068e3 (patch) | |
tree | c7a11a26232a0e117d0b2b3c95a2d79b7985967b /settings/Hooks.php | |
parent | f109c1a10c9f5acf0d5d3e4f864e3702f99db937 (diff) | |
download | nextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.tar.gz nextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.zip |
Set the subject with the email template to allow theming
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r-- | settings/Hooks.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php index 6f537796517..3da85b4ae74 100644 --- a/settings/Hooks.php +++ b/settings/Hooks.php @@ -122,6 +122,8 @@ class Hooks { 'emailAddress' => $user->getEMailAddress(), 'instanceUrl' => $instanceUrl, ]); + + $template->setSubject($this->l->t('Password for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); $template->addHeader(); $template->addHeading($this->l->t('Password changed for %s', [$user->getDisplayName()]), false); $template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.')); @@ -130,7 +132,7 @@ class Hooks { $message = $this->mailer->createMessage(); $message->setTo([$user->getEMailAddress() => $user->getDisplayName()]); - $message->setSubject($this->l->t('Password for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); + $message->setSubject($template->renderSubject()); $message->setBody($template->renderText(), 'text/plain'); $message->setHtmlBody($template->renderHtml()); @@ -193,6 +195,8 @@ class Hooks { 'oldEMailAddress' => $oldMailAddress, 'instanceUrl' => $instanceUrl, ]); + + $template->setSubject($this->l->t('Email address for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); $template->addHeader(); $template->addHeading($this->l->t('Email address changed for %s', [$user->getDisplayName()]), false); $template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.')); @@ -204,7 +208,7 @@ class Hooks { $message = $this->mailer->createMessage(); $message->setTo([$oldMailAddress => $user->getDisplayName()]); - $message->setSubject($this->l->t('Email address for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); + $message->setSubject($template->renderSubject()); $message->setBody($template->renderText(), 'text/plain'); $message->setHtmlBody($template->renderHtml()); |