Project

General

Profile

Actions

Bug #93492

closed

FE_Login - Redirect after login error didn't work because of cookieWarning implementation

Added by Paul Kamma about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
felogin
Target version:
-
Start date:
2021-02-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
felogin
Complexity:
Is Regression:
Sprint Focus:

Description

When a redirect on login error is setted the redirect didnt work.
I peeked inside the code and found this part where he leaves before he can redirect the user.

sysext/felogin/Classes/Controller/LoginController.php at line 117

public function initializeAction(): void
{
    $this->loginType = (string)$this->requestHandler->getPropertyFromGetAndPost('logintype');
    $this->configuration = RedirectConfiguration::fromSettings($this->settings);
    if ($this->isLoginOrLogoutInProgress() && !$this->isRedirectDisabled()) {

        if (!$this->userAspect->isLoggedIn() && $this->userService->cookieWarningRequired()) {
            $this->showCookieWarning = true;
// THIS RETURN PREVENTS THAT IT CONTINUES TO THE REDIRECT
// WHEN I REMOVE IT IT WORKS
            return;
        }

        $this->redirectUrl = $this->redirectHandler->processRedirect(
            $this->loginType,
            $this->configuration,
            $this->request->hasArgument('redirectReferrer') ? $this->request->getArgument('redirectReferrer') : ''
        );
    }
}

Maybe the return have to be removed.

Actions

Also available in: Atom PDF