Skip to content

Commit

Permalink
[BUGFIX] Fis issues with felogin
Browse files Browse the repository at this point in the history
Adjust API after changes in TYPO3 v11.5 core

TYPO3/typo3@3e45e21

Resolves: #621
  • Loading branch information
twoldanski committed Jul 17, 2023
1 parent 5d142ff commit 227a853
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Classes/XClass/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public function loginAction(): ResponseInterface
}

if ($this->redirectUrl !== '') {
$this->eventDispatcher->dispatch(new BeforeRedirectEvent($this->loginType, $this->redirectUrl));
$event = $this->eventDispatcher->dispatch(new BeforeRedirectEvent($this->loginType, $this->redirectUrl, $this->request));
$data = [
'redirectUrl' => $this->redirectUrl,
'statusCode' => 301
'redirectUrl' => $event->getRedirectUrl(),
'statusCode' => 303
];
return $this->responseFactory->createResponse()->withHeader('Content-Type', 'application/json; charset=utf-8')
->withBody($this->streamFactory->createStream(json_encode($data)));
Expand Down Expand Up @@ -96,10 +96,10 @@ public function overviewAction(bool $showLoginMessage = false): ResponseInterfac
$this->eventDispatcher->dispatch(new LoginConfirmedEvent($this, $this->view));

if ($this->redirectUrl !== '') {
$this->eventDispatcher->dispatch(new BeforeRedirectEvent($this->loginType, $this->redirectUrl));
$event = $this->eventDispatcher->dispatch(new BeforeRedirectEvent($this->loginType, $this->redirectUrl, $this->request));
$data = [
'redirectUrl' => $this->redirectUrl,
'statusCode' => 301,
'redirectUrl' => $event->getRedirectUrl(),
'statusCode' => 303,
'status' => 'success'
];
return $this->responseFactory->createResponse()->withHeader('Content-Type', 'application/json; charset=utf-8')
Expand Down

0 comments on commit 227a853

Please sign in to comment.