Browse Source

fixes a privilege problem when retrieving group-membership information

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17975 44c647ce-9c0f-0410-b52a-842ac1e357ba
sgehrig 16 years ago
parent
commit
6d634709b7
1 changed files with 8 additions and 0 deletions
  1. 8 0
      library/Zend/Auth/Adapter/Ldap.php

+ 8 - 0
library/Zend/Auth/Adapter/Ldap.php

@@ -446,6 +446,14 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
             $group = $group->addAnd($groupFilter);
         }
 
+        /*
+         * Fixes problem when authenticated user is not allowed to retrieve
+         * group-membership information.
+         * This requires that the user specified with "username" and "password"
+         * in the Zend_Ldap options is able to retrieve the required information.
+         */
+        $ldap->bind();
+
         $result = $ldap->count($group, $adapterOptions['groupDn'], $adapterOptions['groupScope']);
 
         if ($result === 1) {