From 36388085f6e27e8a37a6fee94ffa220560c7211e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 7 Jan 2021 10:41:09 +0100 Subject: [PATCH] Set the user language when adding the footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/settings/lib/Mailer/NewUserMailHelper.php | 2 +- apps/settings/tests/Mailer/NewUserMailHelperTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/settings/lib/Mailer/NewUserMailHelper.php b/apps/settings/lib/Mailer/NewUserMailHelper.php index 4b4428e122..14919d02f1 100644 --- a/apps/settings/lib/Mailer/NewUserMailHelper.php +++ b/apps/settings/lib/Mailer/NewUserMailHelper.php @@ -149,7 +149,7 @@ class NewUserMailHelper { $l10n->t('Install Client'), $this->config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients') ); - $emailTemplate->addFooter(); + $emailTemplate->addFooter('', $lang); return $emailTemplate; } diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 8eae43fcc9..6b7a0fb192 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -139,7 +139,7 @@ class NewUserMailHelperTest extends TestCase { $this->timeFactory ->expects($this->once()) ->method('getTime') - ->willReturn('12345'); + ->willReturn(12345); /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user @@ -371,6 +371,7 @@ Welcome to your TestCloud account, you can add, protect, and share your data. Your username is: john + Set your password: https://example.com/resetPassword/MySuperLongSecureRandomToken Install Client: https://nextcloud.com/install/#install-clients