You are here

function ldap_servers_install in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_servers/ldap_servers.install \ldap_servers_install()
  2. 7.2 ldap_servers/ldap_servers.install \ldap_servers_install()

Implements hook_install().

File

ldap_servers/ldap_servers.install, line 13
Install, update and uninstall functions for the LDAP API module.

Code

function ldap_servers_install() {
  variable_set('ldap_servers_encryption', LDAP_SERVERS_ENC_TYPE_CLEARTEXT);
  variable_set('ldap_servers_require_ssl_for_credentails', 0);
  if (!($key = variable_get('ldap_servers_encrypt_key', NULL))) {
    module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
    ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.encryption');
    $key = ldap_servers_random_salt(10);
    variable_set('ldap_servers_encrypt_key', $key);
  }
}