From: Olivier Mehani Date: Wed, 10 Feb 2016 11:08:40 +0000 (+0000) Subject: Full name in LDAP is usually cn; compare ldap_connect() to false X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d6f727974b7c29c2966c194b2069faeb196ed8c2;p=friendica-addons.git Full name in LDAP is usually cn; compare ldap_connect() to false Signed-off-by: Olivier Mehani --- 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; }