connection errors are handled by login.php
This commit is contained in:
parent
5f662c7d6f
commit
60c2e7db96
|
@ -95,22 +95,14 @@ class Ldap{
|
||||||
echo _("No username was specified!");
|
echo _("No username was specified!");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($this->conf->get_SSL() == "True") $this->server = ldap_connect("ldaps://" . $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());
|
else $this->server = @ldap_connect("ldap://" . $this->conf->get_Host(), $this->conf->get_Port());
|
||||||
if ($this->server) {
|
if ($this->server) {
|
||||||
$bind = ldap_bind($this->server, $user, $passwd);
|
$bind = @ldap_bind($this->server, $user, $passwd);
|
||||||
if ($bind) {
|
if ($bind) {
|
||||||
// return server handle
|
// return server handle
|
||||||
return $this->server;
|
return $this->server;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
echo _("Unable to bind to Server!");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo _("Unable to connect to Server!");
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue