[BUGFIX] Wrong check removes FE cookie 25/27525/2
authorFrans Saris <franssaris@gmail.com>
Mon, 10 Feb 2014 14:06:42 +0000 (15:06 +0100)
committerBenjamin Mack <benni@typo3.org>
Tue, 11 Feb 2014 08:59:58 +0000 (09:59 +0100)
Issue #55549 added a wrong check for user uid.
As result the FE cookie gets deleted when you are
loggedin instead when your not.

This change inverses the check.

Resolves: #55845
Releases: 6.2
Change-Id: I0c59afb8c89e9f7887970eaf0a4079fe98280b2c
Reviewed-on: https://review.typo3.org/27525
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php

index 9561435..f5e92c1 100644 (file)
@@ -414,7 +414,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
                                // Remove session-data
                                $this->removeSessionData();
                                // Remove cookie if not logged in as the session data is removed as well
-                               if (!empty($this->user['uid'])) {
+                               if (empty($this->user['uid'])) {
                                        $this->removeCookie($this->name);
                                }
                        } elseif ($this->sessionDataTimestamp === NULL) {