You are here

function simple_ldap_sso_user_login in Simple LDAP 7.2

Same name and namespace in other branches
  1. 7 simple_ldap_sso/simple_ldap_sso.module \simple_ldap_sso_user_login()

Implements hook_user_login().

File

simple_ldap_sso/simple_ldap_sso.module, line 108

Code

function simple_ldap_sso_user_login(array &$edit, stdClass $account) {

  // If this is user 1, or the module isn't configured, just return.
  if ($account->uid == 1 || !simple_ldap_sso_configured()) {
    return;
  }

  // The session hasn't been written to the sessions table yet, so we need to
  // wait until that occurs by registering our own shutdown function.
  drupal_register_shutdown_function('simple_ldap_sso_login_shutdown');

  // Set our session value that shows that the SSO cookie we're about to
  // generate doesn't need validation.
  simple_ldap_sso_session_is_valid();
}