From 490238faf68b1bdfbb5441994a06ffb64cf574d2 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Fri, 18 Dec 2009 18:27:15 -0600 Subject: search->count() doesnt seem to be cached, so we will --- plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index df8aa0792..f688a3f7e 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; } } -- cgit v1.2.3-54-g00ecf