You are here

public function LdapAuthenticationConfAdmin::__construct in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authentication/LdapAuthenticationConfAdmin.class.php \LdapAuthenticationConfAdmin::__construct()
  2. 7 ldap_authentication/LdapAuthenticationConfAdmin.class.php \LdapAuthenticationConfAdmin::__construct()

Overrides LdapAuthenticationConf::__construct

File

ldap_authentication/LdapAuthenticationConfAdmin.class.php, line 260

Class

LdapAuthenticationConfAdmin

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->authenticationServersOptions[$sid] = $ldap_server->name . ' (' . $ldap_server->address . ') Status: ' . $enabled;
    }
  }
}