Index: moodle/auth/shibboleth/logout.php =================================================================== --- moodle/auth/shibboleth/logout.php (revision 3897) +++ moodle/auth/shibboleth/logout.php (working copy) @@ -125,10 +125,11 @@ global $CFG, $SESSION, $DB; // Delete session of user using $SessionID - if(empty($CFG->dbsessions)) { + $session_class = $CFG->session_handler_class; + if(preg_match('/file/i', $session_class) === 1) { // File session - $dir = $CFG->dataroot .'/sessions'; + $dir = $CFG->session_file_save_path; if (is_dir($dir)) { if ($dh = opendir($dir)) { // Read all session files @@ -159,7 +160,7 @@ closedir($dh); } } - } else { + } elseif(preg_match('/database/i', $session_class) === 1) { // DB Session //TODO: this needs to be rewritten to use new session stuff if (!empty($CFG->sessiontimeout)) { @@ -184,7 +185,12 @@ } } } + } elseif(preg_match('/memcached/i', $session_class) === 1) { + throw new ErrorException('memcached shibboleth logout not implemented'); + } else { + throw new ErrorException('cannot logout, unknown session class: ' . $session_class); } + // If now SoapFault was thrown the function will return OK as the SP assumes