/** * delete all sessions that has been timed out * * @param int $maxTimeOut The number of seconds for the session's life time * * @return SessionService */ public static function cleanUp($maxTimeOut) { $now = new UDate(); $now->modify('-' . $maxTimeOut . ' second'); return self::deleteByCriteria('`active` = 0 and `updated` < ?', array($now->__toString())); }