From 0d58d74eab8881c7e3e9b7e99e90b87b51ec87b4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 1 Mar 2006 23:30:21 +0100 Subject: Postgres backend for new OO auth darcs-hash:20060301223021-7ad00-868d32088de468523c63c4cc7e44869331dfc4b9.gz --- inc/auth/ldap.class.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'inc/auth/ldap.class.php') diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index 49643d3bf..852634e3d 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -1,10 +1,9 @@ * @author Chris Smith */ @@ -19,6 +18,15 @@ class auth_ldap extends auth_basic { function auth_ldap(){ global $conf; $this->cnf = $conf['auth']['ldap']; + + // ldap extension is needed + if(!function_exists('ldap_connect')) { + if ($this->cnf['debug']) + msg("LDAP err: PHP LDAP extension not found.",-1); + $this->success = false; + return; + } + if(empty($this->cnf['groupkey'])) $this->cnf['groupkey'] = 'cn'; // try to connect -- cgit v1.2.3