From f1766832072d3d4498f38904d930b4bf48941908 Mon Sep 17 00:00:00 2001 From: Oliver Bartsch Date: Thu, 17 Dec 2020 13:28:58 +0100 Subject: [PATCH] [BUGFIX] Set request for recovery email in EXT:felogin 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 Tested-by: TYPO3com Tested-by: Christian Kuhn Reviewed-by: Georg Ringer Reviewed-by: Christian Kuhn --- typo3/sysext/felogin/Classes/Service/RecoveryService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/typo3/sysext/felogin/Classes/Service/RecoveryService.php b/typo3/sysext/felogin/Classes/Service/RecoveryService.php index 500766e470fe..155072d93add 100644 --- a/typo3/sysext/felogin/Classes/Service/RecoveryService.php +++ b/typo3/sysext/felogin/Classes/Service/RecoveryService.php @@ -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; @@ -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; }