Send emails on password reset to the displayname
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
49b7b5ba53
commit
6ed4c604c7
|
@ -378,7 +378,7 @@ class LostController extends Controller {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$message = $this->mailer->createMessage();
|
$message = $this->mailer->createMessage();
|
||||||
$message->setTo([$email => $user->getUID()]);
|
$message->setTo([$email => $user->getDisplayName()]);
|
||||||
$message->setFrom([$this->from => $this->defaults->getName()]);
|
$message->setFrom([$this->from => $this->defaults->getName()]);
|
||||||
$message->useTemplate($emailTemplate);
|
$message->useTemplate($emailTemplate);
|
||||||
$this->mailer->send($message);
|
$this->mailer->send($message);
|
||||||
|
|
|
@ -93,6 +93,9 @@ class LostControllerTest extends \Test\TestCase {
|
||||||
$this->existingUser->expects($this->any())
|
$this->existingUser->expects($this->any())
|
||||||
->method('getUID')
|
->method('getUID')
|
||||||
->willReturn('ExistingUser');
|
->willReturn('ExistingUser');
|
||||||
|
$this->existingUser->expects($this->any())
|
||||||
|
->method('getDisplayName')
|
||||||
|
->willReturn('Existing User');
|
||||||
$this->existingUser->expects($this->any())
|
$this->existingUser->expects($this->any())
|
||||||
->method('isEnabled')
|
->method('isEnabled')
|
||||||
->willReturn(true);
|
->willReturn(true);
|
||||||
|
@ -344,7 +347,7 @@ class LostControllerTest extends \Test\TestCase {
|
||||||
$message
|
$message
|
||||||
->expects($this->at(0))
|
->expects($this->at(0))
|
||||||
->method('setTo')
|
->method('setTo')
|
||||||
->with(['test@example.com' => 'ExistingUser']);
|
->with(['test@example.com' => 'Existing User']);
|
||||||
$message
|
$message
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('setFrom')
|
->method('setFrom')
|
||||||
|
@ -422,7 +425,7 @@ class LostControllerTest extends \Test\TestCase {
|
||||||
$message
|
$message
|
||||||
->expects($this->at(0))
|
->expects($this->at(0))
|
||||||
->method('setTo')
|
->method('setTo')
|
||||||
->with(['test@example.com' => 'ExistingUser']);
|
->with(['test@example.com' => 'Existing User']);
|
||||||
$message
|
$message
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('setFrom')
|
->method('setFrom')
|
||||||
|
@ -494,7 +497,7 @@ class LostControllerTest extends \Test\TestCase {
|
||||||
$message
|
$message
|
||||||
->expects($this->at(0))
|
->expects($this->at(0))
|
||||||
->method('setTo')
|
->method('setTo')
|
||||||
->with(['test@example.com' => 'ExistingUser']);
|
->with(['test@example.com' => 'Existing User']);
|
||||||
$message
|
$message
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('setFrom')
|
->method('setFrom')
|
||||||
|
|
Loading…
Reference in New Issue