Revert "[BUGFIX] FE session records are never removed" 64/18464/2
authorOliver Hader <oliver@typo3.org>
Mon, 25 Feb 2013 07:34:54 +0000 (08:34 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 25 Feb 2013 08:00:53 +0000 (09:00 +0100)
This reverts commit da58b20c22a0a69df4d14599c59a850a09b19dc5.

Change-Id: I2a0e2ab45c3b94d6c036187aa296a0983313a42a
Resolves: #45570
Reviewed-on: https://review.typo3.org/18464
Reviewed-by: Xavier Perseguers
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/cms/tslib/class.tslib_feuserauth.php

index a41727c..f20544d 100644 (file)
@@ -397,14 +397,9 @@ class tslib_feUserAuth extends t3lib_userAuth {
                if ($this->userData_change)     {
                        $this->writeUC('');
                }
-
-               if ($this->sesData_change && $this->id) {
-                       if (empty($this->sesData)) {
-                               // Remove session-data
-                               $this->removeSessionData();
-                       } elseif ($this->sessionDataTimestamp === NULL) {
-                                       // Write new session-data
-                               $insertFields = array(
+               if ($this->sesData_change)      {
+                       if ($this->id)  {
+                               $insertFields = array (
                                        'hash' => $this->id,
                                        'content' => serialize($this->sesData),
                                        'tstamp' => $GLOBALS['EXEC_TIME'],
@@ -478,20 +473,12 @@ class tslib_feUserAuth extends t3lib_userAuth {
                        switch($type)   {
                                case 'user':
                                        if ($this->user['uid']) {
-                                               if ($data === NULL) {
-                                                       unset($this->uc[$key]);
-                                               } else {
-                                                       $this->uc[$key] = $data;
-                                               }
+                                               $this->uc[$key]=$data;
                                                $this->userData_change=1;
                                        }
                                break;
                                case 'ses':
-                                       if ($data === NULL) {
-                                               unset($this->sesData[$key]);
-                                       } else {
-                                               $this->sesData[$key] = $data;
-                                       }
+                                       $this->sesData[$key]=$data;
                                        $this->sesData_change=1;
                                break;
                        }