summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/auth/ldap.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php
index 852634e3d..f30606379 100644
--- a/inc/auth/ldap.class.php
+++ b/inc/auth/ldap.class.php
@@ -273,8 +273,8 @@ class auth_ldap extends auth_basic {
function _openLDAP(){
if($this->con) return true; // connection already established
- if(!$this->cnf['port']) $port = 636;
- $this->con = @ldap_connect($this->cnf['server'],$this->cnf['port']);
+ $port = ($this->cnf['port']) ? $this->cnf['port'] : 636;
+ $this->con = @ldap_connect($this->cnf['server'],$port);
if(!$this->con){
msg("LDAP: couldn't connect to LDAP server",-1);
return false;