Added feature #11302: Add possibility to trigger removal of frontend session data...
authorOliver Hader <oliver.hader@typo3.org>
Tue, 9 Jun 2009 08:59:33 +0000 (08:59 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 9 Jun 2009 08:59:33 +0000 (08:59 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5575 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_feuserauth.php

index d1e9087..9b71a1b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-09  Oliver Hader  <oliver@typo3.org>
+
+       * Added feature #11302: Add possibility to trigger removal of frontend session data of the current session
+
 2009-06-08  Rupert Germann  <rupi@gmx.li>
 
        * Followup #11033: added missing hook class
index bcb77ce..02b8858 100644 (file)
@@ -394,13 +394,25 @@ class tslib_feUserAuth extends t3lib_userAuth {
                                        'content' => serialize($this->sesData),
                                        'tstamp' => time()
                                );
-                               $GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, 'fe_session_data'));
+                               $this->removeSessionData();
                                $GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_session_data', $insertFields);
                        }
                }
        }
 
        /**
+        * Removes data of the current session.
+        *
+        * @return      void
+        */
+       public function removeSessionData() {
+               $GLOBALS['TYPO3_DB']->exec_DELETEquery(
+                       'fe_session_data',
+                       'hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, 'fe_session_data')
+               );
+       }
+
+       /**
         * Returns session data for the fe_user; Either persistent data following the fe_users uid/profile (requires login) or current-session based (not available when browse is closed, but does not require login)
         *
         * @param       string          Session data type; Either "user" (persistent, bound to fe_users profile) or "ses" (temporary, bound to current session cookie)