diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-30 22:56:14 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-09-05 16:03:40 +0200 |
commit | ec00e4b0019cb616b5960e6f1bd77e1f4922ec59 (patch) | |
tree | aa132b100c9cf3c7aae3d84354407c3d666e4c56 /settings/Hooks.php | |
parent | 42b46ead6746a675c2a38cad7d798d1b73e2ccb9 (diff) | |
download | nextcloud-server-ec00e4b0019cb616b5960e6f1bd77e1f4922ec59.tar.gz nextcloud-server-ec00e4b0019cb616b5960e6f1bd77e1f4922ec59.zip |
Implement metadata for email templates of remaining emails
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r-- | settings/Hooks.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php index 2cc5ce30bbe..242fa5cb662 100644 --- a/settings/Hooks.php +++ b/settings/Hooks.php @@ -118,6 +118,11 @@ class Hooks { if ($user->getEMailAddress() !== null) { $template = $this->mailer->createEMailTemplate(); + $template->setMetaData('settings.PasswordChanged', [ + 'displayname' => $user->getDisplayName(), + 'emailAddress' => $user->getEMailAddress(), + 'instanceUrl' => $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.')); @@ -184,6 +189,12 @@ class Hooks { if ($oldMailAddress !== null) { $template = $this->mailer->createEMailTemplate(); + $template->setMetaData('settings.EmailChanged', [ + 'displayname' => $user->getDisplayName(), + 'newEMailAddress' => $user->getEMailAddress(), + 'oldEMailAddress' => $oldMailAddress, + 'instanceUrl' => $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.')); |