Index: class.auth_ldap.inc.php =================================================================== RCS file: /var/cvs/phpgroupware/phpgwapi/inc/class.auth_ldap.inc.php,v retrieving revision 1.17.2.1.2.7 diff -u -r1.17.2.1.2.7 class.auth_ldap.inc.php --- class.auth_ldap.inc.php 26 Feb 2004 02:04:46 -0000 1.17.2.1.2.7 +++ class.auth_ldap.inc.php 30 Mar 2004 16:19:11 -0000 @@ -29,7 +29,13 @@ */ error_reporting(0); - if(!$ldap = @ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host'])) + $location = explode(':', $GLOBALS['phpgw_info']['server']['ldap_host']); + $host = $location[0]; + if (! $port = intval($location[1])) + { + $port = '389'; + } + if(!$ldap = @ldap_connect($host, $port)) { $GLOBALS['phpgw']->log->message('F-Abort, Failed connecting to LDAP server for authenication, execution stopped'); $GLOBALS['phpgw']->log->commit(); @@ -61,7 +67,7 @@ $passwd = crypt(microtime()); } /* try to bind as the user with user suplied password */ - if (@ldap_bind($ldap, $userDN, $passwd)) + if (ldap_bind($ldap, $userDN, $passwd)) { return true; } Index: class.common.inc.php =================================================================== RCS file: /var/cvs/phpgroupware/phpgwapi/inc/class.common.inc.php,v retrieving revision 1.123.2.9.2.28 diff -u -r1.123.2.9.2.28 class.common.inc.php --- class.common.inc.php 2 Mar 2004 22:25:04 -0000 1.123.2.9.2.28 +++ class.common.inc.php 30 Mar 2004 16:19:11 -0000 @@ -240,7 +240,13 @@ } // connect to ldap server - if (! $ds = ldap_connect($host)) + $location = explode(':', $host); + $host = $location[0]; + if (! $port = intval($location[1])) + { + $port = '389'; + } + if (! $ds = ldap_connect($host, $port)) { /* log does not exist in setup(, yet) */ if(is_object($GLOBALS['phpgw']->log))