From 60c2e7db9614c45ab9677f727cdc9a9137756e65 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 16 Mar 2003 10:32:45 +0000 Subject: [PATCH] connection errors are handled by login.php --- lam/lib/ldap.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lam/lib/ldap.php b/lam/lib/ldap.php index d22ce0c1..6612b09c 100644 --- a/lam/lib/ldap.php +++ b/lam/lib/ldap.php @@ -95,22 +95,14 @@ class Ldap{ echo _("No username was specified!"); exit; } - if ($this->conf->get_SSL() == "True") $this->server = ldap_connect("ldaps://" . $this->conf->get_Host(), $this->conf->get_Port()); - else $this->server = ldap_connect("ldap://" . $this->conf->get_Host(), $this->conf->get_Port()); + if ($this->conf->get_SSL() == "True") $this->server = @ldap_connect("ldaps://" . $this->conf->get_Host(), $this->conf->get_Port()); + else $this->server = @ldap_connect("ldap://" . $this->conf->get_Host(), $this->conf->get_Port()); if ($this->server) { - $bind = ldap_bind($this->server, $user, $passwd); + $bind = @ldap_bind($this->server, $user, $passwd); if ($bind) { // return server handle return $this->server; } - else { - echo _("Unable to bind to Server!"); - exit; - } - } - else { - echo _("Unable to connect to Server!"); - exit; } }