From f67c4350ff41a11f6c321444fa86e9b062331fea Mon Sep 17 00:00:00 2001
From: twoldanski <66474451+twoldanski@users.noreply.github.com>
Date: Mon, 22 Jul 2024 16:46:59 +0200
Subject: [PATCH] [TASK] Align LoginController with latest core version (#753)

---
 Classes/XClass/Controller/LoginController.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Classes/XClass/Controller/LoginController.php b/Classes/XClass/Controller/LoginController.php
index 6f776ff6..05286e8d 100644
--- a/Classes/XClass/Controller/LoginController.php
+++ b/Classes/XClass/Controller/LoginController.php
@@ -40,10 +40,10 @@ public function loginAction(): ResponseInterface
         $status = 'success';
 
         if ($this->isLogoutSuccessful()) {
-            $this->eventDispatcher->dispatch(new LogoutConfirmedEvent($this, $this->view));
+            $this->eventDispatcher->dispatch(new LogoutConfirmedEvent($this, $this->view, $this->request));
         } elseif ($this->hasLoginErrorOccurred()) {
             $status = 'failure';
-            $this->eventDispatcher->dispatch(new LoginErrorOccurredEvent());
+            $this->eventDispatcher->dispatch(new LoginErrorOccurredEvent($this->request));
         }
 
         if (($forwardResponse = $this->handleLoginForwards()) !== null) {
@@ -53,7 +53,7 @@ public function loginAction(): ResponseInterface
             return $redirectResponse;
         }
 
-        $this->eventDispatcher->dispatch(new ModifyLoginFormViewEvent($this->view));
+        $this->eventDispatcher->dispatch(new ModifyLoginFormViewEvent($this->view, $this->request));
 
         $storagePageIds = ($GLOBALS['TYPO3_CONF_VARS']['FE']['checkFeUserPid'] ?? false)
             ? $this->pageRepository->getPageIdsRecursive(GeneralUtility::intExplode(',', (string)($this->settings['pages'] ?? ''), true), (int)($this->settings['recursive'] ?? 0))