]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
search->count() doesnt seem to be cached, so we will
authorEric Helgeson <erichelgeson@gmail.com>
Sat, 19 Dec 2009 00:27:15 +0000 (18:27 -0600)
committerEric Helgeson <erichelgeson@gmail.com>
Sat, 19 Dec 2009 00:27:15 +0000 (18:27 -0600)
plugins/LdapAuthentication/LdapAuthenticationPlugin.php

index df8aa079289fd2cdf71c70ab556892d52b03634f..f688a3f7e014ad4fa67165e324d486c9401c6bd9 100644 (file)
@@ -199,13 +199,14 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
             return false;
         }
 
-        if($search->count()==0){
+        $searchcount = $search->count();
+        if($searchcount == 0) {
             return false;
-        }else if($search->count()==1){
+        }else if($searchcount == 1) {
             $entry = $search->shiftEntry();
             return $entry;
         }else{
-            common_log(LOG_WARNING, 'Found ' . $search->count() . ' ldap user with the username: ' . $username);
+            common_log(LOG_WARNING, 'Found ' . $searchcount . ' ldap user with the username: ' . $username);
             return false;
         }
     }