Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-04 16:07:19 +0300
committerJoas Schilling <coding@schilljs.com>2017-09-04 16:07:41 +0300
commit6dbb64c4a2748467a61e5ed7821ac6526c86a093 (patch)
tree49e8ffa545292f5d40f9aabd1b229756452d6b98 /settings
parent95ecab03568f2865b166a12156709d8271f7c9be (diff)
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')
-rw-r--r--settings/Controller/MailSettingsController.php4
-rw-r--r--settings/Hooks.php6
-rw-r--r--settings/Mailer/NewUserMailHelper.php3
3 files changed, 4 insertions, 9 deletions
diff --git a/settings/Controller/MailSettingsController.php b/settings/Controller/MailSettingsController.php
index 44cece1d658..974a95618ad 100644
--- a/settings/Controller/MailSettingsController.php
+++ b/settings/Controller/MailSettingsController.php
@@ -147,9 +147,7 @@ class MailSettingsController extends Controller {
try {
$displayName = $this->userSession->getUser()->getDisplayName();
- $template = $this->mailer->createEMailTemplate();
-
- $template->setMetaData('settings.TestEmail', [
+ $template = $this->mailer->createEMailTemplate('settings.TestEmail', [
'displayname' => $displayName,
]);
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,
diff --git a/settings/Mailer/NewUserMailHelper.php b/settings/Mailer/NewUserMailHelper.php
index cee684d1cbf..9fc6a4a3c70 100644
--- a/settings/Mailer/NewUserMailHelper.php
+++ b/settings/Mailer/NewUserMailHelper.php
@@ -116,8 +116,7 @@ class NewUserMailHelper {
$displayName = $user->getDisplayName();
$userId = $user->getUID();
- $emailTemplate = $this->mailer->createEMailTemplate();
- $emailTemplate->setMetaData('settings.Welcome', [
+ $emailTemplate = $this->mailer->createEMailTemplate('settings.Welcome', [
'link' => $link,
'displayname' => $displayName,
'userid' => $userId,