diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-03-01 23:30:21 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-03-01 23:30:21 +0100 |
commit | 0d58d74eab8881c7e3e9b7e99e90b87b51ec87b4 (patch) | |
tree | b066c7947785318818c0a567a360d96f664c6987 /inc/auth/ldap.class.php | |
parent | a87b764bf4350b87cbe082ac39e6154223a4bc37 (diff) | |
download | rpg-0d58d74eab8881c7e3e9b7e99e90b87b51ec87b4.tar.gz rpg-0d58d74eab8881c7e3e9b7e99e90b87b51ec87b4.tar.bz2 |
Postgres backend for new OO auth
darcs-hash:20060301223021-7ad00-868d32088de468523c63c4cc7e44869331dfc4b9.gz
Diffstat (limited to 'inc/auth/ldap.class.php')
-rw-r--r-- | inc/auth/ldap.class.php | 16 |
1 files changed, 12 insertions, 4 deletions
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 @@ <?php /** - * auth/basic.class.php - * - * foundation authorisation class - * all auth classes should inherit from this class + * LDAP authentication backend * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Andreas Gohr <andi@splitbrain.org> * @author Chris Smith <chris@jalakaic.co.uk> */ @@ -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 |