function simplesamlphp_auth_user_logout in simpleSAMLphp Authentication 7.2
Same name and namespace in other branches
- 8.3 simplesamlphp_auth.module \simplesamlphp_auth_user_logout()
- 7.3 simplesamlphp_auth.module \simplesamlphp_auth_user_logout()
- 7 simplesamlphp_auth.module \simplesamlphp_auth_user_logout()
Implements hook_user_logout().
File
- ./
simplesamlphp_auth.module, line 425 - simpleSAMLphp authentication module for Drupal.
Code
function simplesamlphp_auth_user_logout($account) {
global $user;
global $_simplesamlphp_auth_as;
global $_simplesamlphp_auth_saml_attributes;
global $base_url;
if (!empty($_simplesamlphp_auth_saml_attributes)) {
$config = SimpleSAML_Configuration::getInstance();
// :KLUDGE: for some reason Drupal is not killing the session, even if
// drupal_session_destroy_uid() is called here.
session_destroy();
$gotourl = base_path();
if (variable_get('simplesamlphp_auth_logoutgotourl', '')) {
$gotourl = variable_get('simplesamlphp_auth_logoutgotourl', '');
}
// Allow modules to alter $gotourl.
drupal_alter('simplesamlphp_auth_logout_gotourl', $gotourl, $account);
$_simplesamlphp_auth_as
->logout($gotourl);
}
}