You are here

public function LdapUserConfAdmin::__construct in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_user/LdapUserConfAdmin.class.php \LdapUserConfAdmin::__construct()

Overrides LdapUserConf::__construct

File

ldap_user/LdapUserConfAdmin.class.php, line 63

Class

LdapUserConfAdmin

Code

public function __construct() {
  parent::__construct();
  $this
    ->setTranslatableProperties();
  if ($servers = ldap_servers_get_servers(NULL, 'enabled')) {
    foreach ($servers as $sid => $ldap_server) {
      $enabled = $ldap_server->status ? 'Enabled' : 'Disabled';
      $this->drupalAcctProvisionServerOptions[$sid] = $ldap_server->name . ' (' . $ldap_server->address . ') Status: ' . $enabled;
      $this->ldapEntryProvisionServerOptions[$sid] = $ldap_server->name . ' (' . $ldap_server->address . ') Status: ' . $enabled;
    }
  }
  $this->drupalAcctProvisionServerOptions['none'] = t('None');
  $this->ldapEntryProvisionServerOptions['none'] = t('None');
}