]> git.mxchange.org Git - friendica-addons.git/commitdiff
Full name in LDAP is usually cn; compare ldap_connect() to false
authorOlivier Mehani <shtrom+friendica@ssji.net>
Wed, 10 Feb 2016 11:08:40 +0000 (11:08 +0000)
committerOlivier Mehani <shtrom+friendica@ssji.net>
Wed, 10 Feb 2016 11:08:40 +0000 (11:08 +0000)
Signed-off-by: Olivier Mehani <shtrom+friendica@ssji.net>
ldapauth/ldapauth.php

index 825d2c29dd11628dc79b8bcbe9cd854158132a57..60273c3b824d29398e10471f4e403d923368ee2f 100755 (executable)
@@ -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;
     }