english/libraries/joomla/session/storage/database.php
/**
	 * Garbage collect stale sessions from the SessionHandler backend.
	 *
	 * @param   integer  The maximum age of a session.
	 * @return  boolean  True on success, false otherwise.
	 * @since   11.1
	 */
Garbage collect stale sessions from the SessionHandler backend.
@param   integer  The maximum age of a session.
@return  boolean  True on success, false otherwise.
Garbage collect stale sessions from the SessionHandler backend . @param integer The maximum age of a session . @return boolean True on success false otherwise .
function gc($lifetime = 1440)
	{
		$db = JFactory::getDbo();
		if (!$db->connected()) {
			return false;
		}
		$past = time() - $lifetime;
		$db->setQuery(
			'DELETE FROM `#__session`' .
			' WHERE `time` < '.(int) $past
		);
		return (boolean) $db->query();
	}
function gc ( $ lifetime = 1440 ) { $ db = JFactory :: getDbo ( ) ; if ( ! $ db -> connected ( ) ) { return false ; } $ past = time ( ) - $ lifetime ; $ db -> setQuery ( 'DELETE FROM `#__session`' . ' WHERE `time` < ' . ( int ) $ past ) ; return ( boolean ) $ db -> query ( ) ; }
Garbage collect stale sessions from the SessionHandler backend.
Garbage collect stale sessions from the SessionHandler backend .
// Get the database connection object and verify its connected. // Determine the timestamp threshold with which to purge old sessions. // Remove expired sessions from the database.