Commit cf10c68b authored by Torben Hansen's avatar Torben Hansen Committed by Oliver Bartsch
Browse files

[TASK] Return PSR-7 response for actions in felogin LoginController

Since #92784 Extbase controller actions must return a PSR-7 response.

With this patch, all actions in LoginController now return a proper
PSR-7 response object.

Note: A patch for PasswordRecoveryController will be handled in
a separate patch.

Resolves: #94434
Releases: master
Change-Id: I0db06db312c91b01395a3e0d57b9d2f1087a6326
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69657


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 2110556d
......@@ -137,7 +137,7 @@ class LoginController extends AbstractLoginFormController
/**
* Show login form
*/
public function loginAction()
public function loginAction(): ResponseInterface
{
if ($this->isLogoutSuccessful()) {
$this->eventDispatcher->dispatch(new LogoutConfirmedEvent($this, $this->view));
......@@ -164,14 +164,17 @@ class LoginController extends AbstractLoginFormController
'noRedirect' => $this->isRedirectDisabled(),
]
);
return $this->htmlResponse();
}
/**
* User overview for logged in users
*
* @param bool $showLoginMessage
* @return ResponseInterface
*/
public function overviewAction(bool $showLoginMessage = false)
public function overviewAction(bool $showLoginMessage = false): ResponseInterface
{
if (!$this->userAspect->isLoggedIn()) {
return new ForwardResponse('login');
......@@ -187,13 +190,16 @@ class LoginController extends AbstractLoginFormController
'showLoginMessage' => $showLoginMessage,
]
);
return $this->htmlResponse();
}
/**
* Show logout form
* @param int $redirectPageLogout
* @return ResponseInterface
*/
public function logoutAction(int $redirectPageLogout = 0): void
public function logoutAction(int $redirectPageLogout = 0): ResponseInterface
{
$this->handleRedirect();
......@@ -206,6 +212,8 @@ class LoginController extends AbstractLoginFormController
'actionUri' => $this->redirectHandler->getLogoutFormRedirectUrl($this->configuration, $redirectPageLogout, $this->isRedirectDisabled()),
]
);
return $this->htmlResponse();
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment