You are here

function ldap_authentication_get_valid_conf in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authentication/ldap_authentication.module \ldap_authentication_get_valid_conf()
  2. 7 ldap_authentication/ldap_authentication.module \ldap_authentication_get_valid_conf()

Get LdapAuthenticationConf object.

Return value

object LdapAuthenticationConf object if configured, otherwise FALSE

15 calls to ldap_authentication_get_valid_conf()
LdapAuthenticationTestCase::setSsoServerEnvironment in ldap_authentication/tests/ldap_authentication.test
Set mock server variables for sso tests.
LdapAuthenticationTestCase::testAuthenticationWhitelistTests in ldap_authentication/tests/ldap_authentication.test
LdapAuthenticationTestCase::testUI in ldap_authentication/tests/ldap_authentication.test
Make sure user admin interface works.
ldap_authentication_form_user_pass_alter in ldap_authentication/ldap_authentication.module
Implements hook_form_FORM_ID_alter().
ldap_authentication_init in ldap_authentication/ldap_authentication.module
Implements hook_init().

... See full list

File

ldap_authentication/ldap_authentication.module, line 292
This module injects itself into Drupal's Authentication stack.

Code

function ldap_authentication_get_valid_conf($reset = FALSE) {
  static $auth_conf;
  if (!$reset && is_object($auth_conf)) {
    return $auth_conf;
  }
  ldap_servers_module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConf.class');
  $auth_conf = new LdapAuthenticationConf();
  return $auth_conf->inDatabase ? $auth_conf : FALSE;
}