From d6f727974b7c29c2966c194b2069faeb196ed8c2 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 10 Feb 2016 11:08:40 +0000 Subject: [PATCH] Full name in LDAP is usually cn; compare ldap_connect() to false Signed-off-by: Olivier Mehani --- ldapauth/ldapauth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index 825d2c29..60273c3b 100755 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -47,7 +47,7 @@ * // attribute to get email - optional - default : 'mail' * $a->config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail'; * // attribute to get nickname - optional - default : 'givenName' - * $a->config['ldapauth']['ldap_autocreateaccount_nameattribute'] = 'givenName'; + * $a->config['ldapauth']['ldap_autocreateaccount_nameattribute'] = 'cn'; * * ...etc. */ @@ -97,7 +97,7 @@ function ldapauth_authenticate($username,$password) { $connect = @ldap_connect($ldap_server); - if(! $connect) { + if($connect === false) { logger("ldapauth: could not connect to $ldap_server"); return false; }