Browse Source

Constructor checks for LDAP support in PHP.

pallo 25 years ago
parent
commit
be389a99c2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      functions/abook_ldap_server.php

+ 4 - 0
functions/abook_ldap_server.php

@@ -37,6 +37,10 @@
 
 
      // Constructor. Connects to database
      // Constructor. Connects to database
      function abook_ldap_server($param) {
      function abook_ldap_server($param) {
+       if(!function_exists("ldap_connect")) {
+         $this->set_error("LDAP support missing from PHP");
+         return;
+       }
        if(is_array($param)) {
        if(is_array($param)) {
 	 $this->server = $param["host"];
 	 $this->server = $param["host"];
 	 $this->basedn = $param["base"];
 	 $this->basedn = $param["base"];