Permalink
Browse files

Merge branch 'MDL-26257' of git://github.com/bostelm/moodle

  • Loading branch information...
2 parents d1e3624 + f483167 commit 631c9c02abbcc893663f3fead8b4817ae0f439c2 @nebgor nebgor committed Sep 13, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 auth/shibboleth/auth.php
View
@@ -193,11 +193,11 @@ function loginpage_hook() {
*
*/
function logoutpage_hook() {
- global $redirect;
+ global $SESSION, $redirect;
- // Only do this if logout handler is defined
- if (
- isset($this->config->logout_handler)
+ // Only do this if logout handler is defined, and if the user is actually logged in via Shibboleth
+ if ( isset($SESSION->shibboleth_session_id)
+ && isset($this->config->logout_handler)
&& !empty($this->config->logout_handler)
){
// Check if there is an alternative logout return url defined

0 comments on commit 631c9c0

Please sign in to comment.