Skip to content

Commit

Permalink
[BUGFIX] Set request for recovery email in EXT:felogin
Browse files Browse the repository at this point in the history
Because the request was not set for the recovery email,
the TYPO3 logo as well as the website URL in the footer
were not displayed when using the SystemEmail layout
from core.

This is now fixed by setting the request, if available.

Resolves: #93055
Releases: master, 10.4
Change-Id: I005df28b16bddc9a6105f72e361a07c0b7d15532
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67175
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
o-ba authored and lolli42 committed Dec 17, 2020
1 parent e4833fd commit f176683
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions typo3/sysext/felogin/Classes/Service/RecoveryService.php
Expand Up @@ -18,6 +18,7 @@
namespace TYPO3\CMS\FrontendLogin\Service;

use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Http\Message\ServerRequestInterface;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
Expand Down Expand Up @@ -177,6 +178,10 @@ protected function prepareMail(Address $receiver, string $hash): Email
$mail->addReplyTo($replyTo);
}

if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
$mail->setRequest($GLOBALS['TYPO3_REQUEST']);
}

return $mail;
}

Expand Down

0 comments on commit f176683

Please sign in to comment.