You are here

function ldap_authentication_ldap_server_in_use in Lightweight Directory Access Protocol (LDAP) 7

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

Implements hook_ldap_ldap_server_in_use().

File

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

Code

function ldap_authentication_ldap_server_in_use($sid, $server_name) {
  $use_warnings = array();
  $auth_conf = ldap_authentication_get_valid_conf();
  if (in_array($sid, array_keys($auth_conf->sids)) && $auth_conf->sids[$sid] == 1) {
    $use_warnings[] = t('This server (%server_name) may not be deleted or
      disabled because it is being used for ldap authentication.', array(
      '%server_name' => $server_name,
    ));
  }
  return $use_warnings;
}