From: Eric Helgeson Date: Sat, 19 Dec 2009 00:27:15 +0000 (-0600) Subject: search->count() doesnt seem to be cached, so we will X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=490238faf68b1bdfbb5441994a06ffb64cf574d2;p=quix0rs-gnu-social.git search->count() doesnt seem to be cached, so we will --- diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index df8aa07928..f688a3f7e0 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -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; } }