Do not redirect to logout after login

This can happen when the session was killed due to a timeout. Then
logout was triggered. Nobody wants to login only to be logged out again.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-01-15 09:29:54 +01:00 committed by backportbot[bot]
parent 1e8ae62c21
commit 8e1a04621e
1 changed files with 4 additions and 1 deletions

View File

@ -175,7 +175,10 @@ class LoginController extends Controller {
);
if (!empty($redirect_url)) {
$this->initialStateService->provideInitialState('core', 'loginRedirectUrl', $redirect_url);
[$url, ] = explode('?', $redirect_url);
if ($url !== $this->urlGenerator->linkToRoute('core.login.logout')) {
$this->initialStateService->provideInitialState('core', 'loginRedirectUrl', $redirect_url);
}
}
$this->initialStateService->provideInitialState(