Skip to content

Commit

Permalink
Merge pull request #24999 from nextcloud/bugfix/noid/email-footer-lan…
Browse files Browse the repository at this point in the history
…guage

Set the user language when adding the footer
  • Loading branch information
rullzer authored Jan 7, 2021
2 parents 8294726 + 068e3b2 commit 5020c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/settings/lib/Mailer/NewUserMailHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function generateTemplate(IUser $user, $generatePasswordResetToken = fals
);
}

$emailTemplate->addFooter();
$emailTemplate->addFooter('', $lang);

return $emailTemplate;
}
Expand Down
3 changes: 2 additions & 1 deletion apps/settings/tests/Mailer/NewUserMailHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function testGenerateTemplateWithPasswordResetToken() {
$this->timeFactory
->expects($this->once())
->method('getTime')
->willReturn('12345');
->willReturn(12345);
/** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
Expand Down Expand Up @@ -371,6 +371,7 @@ public function testGenerateTemplateWithPasswordResetToken() {
Your username is: john
Set your password: https://example.com/resetPassword/MySuperLongSecureRandomToken
Install Client: https://nextcloud.com/install/#install-clients
Expand Down

0 comments on commit 5020c73

Please sign in to comment.