[BUGFIX] Check for logged in user before showing cookie warning 23/30723/5
authorTomita Militaru <militarutomita@gmail.com>
Sat, 14 Jun 2014 11:52:38 +0000 (14:52 +0300)
committerMarkus Klein <klein.t3@mfc-linz.at>
Fri, 20 Jun 2014 11:02:28 +0000 (13:02 +0200)
If a redirect for login error is setup, the warning cookie
message is displayed instead of redirecting.

Resolves: #59493
Releases: 6.3, 6.2
Change-Id: I2f63b6630863ece0704198f247980c4d6c08f65a
Reviewed-on: https://review.typo3.org/30723
Reviewed-by: Oliver Hader
Reviewed-by: Marc Wöhlken
Tested-by: Marc Wöhlken
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php

index a71e9f3..cdc7cd7 100644 (file)
@@ -180,7 +180,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
                }
                // Process the redirect
                if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl && !$this->noRedirect) {
-                       if (!$GLOBALS['TSFE']->fe_user->isCookieSet()) {
+                       if (!$GLOBALS['TSFE']->fe_user->isCookieSet() && $this->userIsLoggedIn) {
                                $content .= $this->cObj->stdWrap($this->pi_getLL('cookie_warning', '', TRUE), $this->conf['cookieWarning_stdWrap.']);
                        } else {
                                // Add hook for extra processing before redirect