summaryrefslogtreecommitdiffstats
path: root/settings/Hooks.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-30 22:56:14 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-30 22:56:14 +0200
commit404bd1be60c1dafd83b8a1bfe3de7addc5878b1c (patch)
tree8492a9f88e92053f45aec21b66f32a335c93f110 /settings/Hooks.php
parentee14659ae8f62da48420f3dd2cb8ed167bfca5dd (diff)
downloadnextcloud-server-404bd1be60c1dafd83b8a1bfe3de7addc5878b1c.tar.gz
nextcloud-server-404bd1be60c1dafd83b8a1bfe3de7addc5878b1c.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.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php
index 115f62a9a2a..f97145da0c0 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.'));