diff options
author | Joas Schilling <coding@schilljs.com> | 2017-09-04 15:07:19 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-09-04 15:07:41 +0200 |
commit | 6dbb64c4a2748467a61e5ed7821ac6526c86a093 (patch) | |
tree | 49e8ffa545292f5d40f9aabd1b229756452d6b98 /settings/Hooks.php | |
parent | 95ecab03568f2865b166a12156709d8271f7c9be (diff) | |
download | nextcloud-server-6dbb64c4a2748467a61e5ed7821ac6526c86a093.tar.gz nextcloud-server-6dbb64c4a2748467a61e5ed7821ac6526c86a093.zip |
Merge setMetaData into constructor
This ensures that the meta data is set in the beginning
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r-- | settings/Hooks.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php index f97145da0c0..6f537796517 100644 --- a/settings/Hooks.php +++ b/settings/Hooks.php @@ -117,8 +117,7 @@ class Hooks { $this->activityManager->publish($event); if ($user->getEMailAddress() !== null) { - $template = $this->mailer->createEMailTemplate(); - $template->setMetaData('settings.PasswordChanged', [ + $template = $this->mailer->createEMailTemplate('settings.PasswordChanged', [ 'displayname' => $user->getDisplayName(), 'emailAddress' => $user->getEMailAddress(), 'instanceUrl' => $instanceUrl, @@ -188,8 +187,7 @@ class Hooks { if ($oldMailAddress !== null) { - $template = $this->mailer->createEMailTemplate(); - $template->setMetaData('settings.EmailChanged', [ + $template = $this->mailer->createEMailTemplate('settings.EmailChanged', [ 'displayname' => $user->getDisplayName(), 'newEMailAddress' => $user->getEMailAddress(), 'oldEMailAddress' => $oldMailAddress, |