Merge pull request #25710 from nextcloud/backport/25707/stable19
[stable19] Send emails on password reset to the displayname
This commit is contained in:
commit
ed262743e8
|
@ -378,7 +378,7 @@ class LostController extends Controller {
|
|||
|
||||
try {
|
||||
$message = $this->mailer->createMessage();
|
||||
$message->setTo([$email => $user->getUID()]);
|
||||
$message->setTo([$email => $user->getDisplayName()]);
|
||||
$message->setFrom([$this->from => $this->defaults->getName()]);
|
||||
$message->useTemplate($emailTemplate);
|
||||
$this->mailer->send($message);
|
||||
|
|
|
@ -94,6 +94,9 @@ class LostControllerTest extends \Test\TestCase {
|
|||
$this->existingUser->expects($this->any())
|
||||
->method('getUID')
|
||||
->willReturn('ExistingUser');
|
||||
$this->existingUser->expects($this->any())
|
||||
->method('getDisplayName')
|
||||
->willReturn('Existing User');
|
||||
$this->existingUser->expects($this->any())
|
||||
->method('isEnabled')
|
||||
->willReturn(true);
|
||||
|
@ -345,7 +348,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
$message
|
||||
->expects($this->at(0))
|
||||
->method('setTo')
|
||||
->with(['test@example.com' => 'ExistingUser']);
|
||||
->with(['test@example.com' => 'Existing User']);
|
||||
$message
|
||||
->expects($this->at(1))
|
||||
->method('setFrom')
|
||||
|
@ -423,7 +426,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
$message
|
||||
->expects($this->at(0))
|
||||
->method('setTo')
|
||||
->with(['test@example.com' => 'ExistingUser']);
|
||||
->with(['test@example.com' => 'Existing User']);
|
||||
$message
|
||||
->expects($this->at(1))
|
||||
->method('setFrom')
|
||||
|
@ -495,7 +498,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
$message
|
||||
->expects($this->at(0))
|
||||
->method('setTo')
|
||||
->with(['test@example.com' => 'ExistingUser']);
|
||||
->with(['test@example.com' => 'Existing User']);
|
||||
$message
|
||||
->expects($this->at(1))
|
||||
->method('setFrom')
|
||||
|
|
Loading…
Reference in New Issue