You are here

function ldap_authentication_get_valid_conf in Lightweight Directory Access Protocol (LDAP) 7

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

get LdapAuthenticationConf object

Return value

object LdapAuthenticationConf object if configured, otherwise FALSE

10 calls to ldap_authentication_get_valid_conf()
ldap_authentication_form_user_pass_alter in ldap_authentication/ldap_authentication.module
Implements hook_form_FORM_ID_alter().
ldap_authentication_ldap_server_in_use in ldap_authentication/ldap_authentication.module
Implements hook_ldap_ldap_server_in_use().
ldap_authentication_menu_alter in ldap_authentication/ldap_authentication.module
Implements hook_menu_alter(). since menu items are cached, only useful to add or alter callbacks for ldap authentication driven menu items.
ldap_authentication_redirect_to_ldap_help in ldap_authentication/ldap_authentication.inc
ldap_authentication_show_ldap_help_link in ldap_authentication/ldap_authentication.module

... See full list

File

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

Code

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