You are here

function ldap_sso_user_logout in Lightweight Directory Access Protocol (LDAP) 8.2

Implements hook_user_logout().

The user just logged out.

File

ldap_sso/ldap_sso.module, line 32
This module injects itself into Drupal's Authentication stack.

Code

function ldap_sso_user_logout($account) {
  $auth_conf = ldap_authentication_get_valid_conf();
  if ($auth_conf->seamlessLogin == 1) {
    $cookie_string = 'do not auto login';
    $cookie_timeout = (int) $auth_conf->cookieExpire;
    setcookie("seamless_login", $cookie_string, $cookie_timeout == -1 ? 0 : $cookie_timeout + time(), base_path(), "");
    $_SESSION['seamless_login'] = $cookie_string;
  }
}