Additional fix to prevent useless redirection in SSO for Drupal - refs BT#10145

1.10.x
Yannick Warnier 9 years ago
parent 28a2a5e9a8
commit a5fdc99fca
  1. 4
      index.php
  2. 3
      main/inc/lib/userportal.lib.php
  3. 8
      main/inc/local.inc.php

@ -35,9 +35,11 @@ $controller = new IndexManager($header_title);
$loginFailed = isset($_GET['loginFailed']) ? true : isset($loginFailed);
if (!empty($_GET['logout'])) {
$controller->logout();
$redirect = !empty($_GET['no_redirect']) ? false : true;
$controller->logout($redirect);
}
/* Table definitions */
/* Constants and CONFIGURATION parameters */

@ -96,8 +96,9 @@ class IndexManager
/**
* Alias for the online_logout() function
* @param bool $redirect Whether to ask online_logout to redirect to index.php or not
*/
function logout() {
function logout($redirect = true) {
online_logout($this->user_id, true);
}

@ -647,7 +647,13 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
exit;
}
}
}//end logout ... else ... login
//end logout ... else ... login
} elseif ($logout) {
//if there was an attempted logout without a previous login, log
// this anonymous user out as well but avoid redirect
online_logout(null, false);
$osso->logout(); //redirects and exits
}
} elseif (api_get_setting('openid_authentication')=='true') {
if (!empty($_POST['openid_url'])) {
include api_get_path(SYS_CODE_PATH).'auth/openid/login.php';

Loading…
Cancel
Save