diff options
author | Eric Helgeson <erichelgeson@gmail.com> | 2009-12-18 18:27:15 -0600 |
---|---|---|
committer | Eric Helgeson <erichelgeson@gmail.com> | 2009-12-18 18:27:15 -0600 |
commit | 490238faf68b1bdfbb5441994a06ffb64cf574d2 (patch) | |
tree | 73d0d1472c1ee8c65ed88f2537e293f88f8924c1 | |
parent | f70c3b6ae997705d8f4c160202f2ae2180c3d16e (diff) |
search->count() doesnt seem to be cached, so we will
-rw-r--r-- | plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 7 |
1 files 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; } } |