Project

General

Profile

Feature #20741 » 0011509_v3.patch

Administrator Admin, 2009-07-20 12:00

View differences:

typo3/sysext/cms/tslib/class.tslib_feuserauth.php (Arbeitskopie)
}
$GLOBALS['TYPO3_DB']->sql_free_result($dbres);
}
// 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);
}
}
/**
......
}
/**
* Executes the garbage collection of session data and session.
* The lifetime of session data is defined by $TYPO3_CONF_VARS['FE']['sessionDataLifetime'].
*
* @return void
*/
public function gc() {
$timeoutTimeStamp = intval($GLOBALS['EXEC_TIME'] - $this->sessionDataLifetime);
$GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'tstamp < ' . $timeoutTimeStamp);
parent::gc();
}
/**
* 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)
(3-3/3)