$session_id)); } return $retval_write !== false; } function pandora_session_destroy ($session_id) { $session_id = addslashes($session_id); $retval = (bool) db_process_sql_delete('tsessions_php', array('id_session' => $session_id)); return $retval; } function pandora_session_gc ($max_lifetime = 300) { global $config; if (isset($config['session_timeout'])) { $max_lifetime = $config['session_timeout']; } $time_limit = time() - $max_lifetime; $retval = (bool) db_process_sql_delete('tsessions_php', array('last_active' => "<" . $time_limit)); return $retval; } // FIXME: SAML should work with pandora session handlers if (db_get_value('value', 'tconfig', 'token', 'auth') != "saml") { $result_handler = session_set_save_handler ('pandora_session_open', 'pandora_session_close', 'pandora_session_read', 'pandora_session_write', 'pandora_session_destroy', 'pandora_session_gc'); } ?>