Feature #20741 » 0011509_v2.patch
typo3/sysext/cms/tslib/class.tslib_feuserauth.php (Arbeitskopie) | ||
---|---|---|
}
|
||
// delete old data:
|
||
if ((rand()%100) <= 1) { // a possibility of 1 % for garbage collection.
|
||
$timeoutTimeStamp = intval($GLOBALS['EXEC_TIME'] - $this->sessionDataLifetime);
|
||
$GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'tstamp < ' . $timeoutTimeStamp);
|
||
$this->purgeSessionData();
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
/**
|
||
* Purges outdated session data.
|
||
* The lifetime is defined by $TYPO3_CONF_VARS['FE']['sessionDataLifetime'].
|
||
*
|
||
* @return void
|
||
*/
|
||
public function purgeSessionData() {
|
||
$timeoutTimeStamp = intval($GLOBALS['EXEC_TIME'] - $this->sessionDataLifetime);
|
||
$GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'tstamp < ' . $timeoutTimeStamp);
|
||
}
|
||
/**
|
||
* 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)
|