*** Horde/Group/Ldap.php.attrisdn	2011-04-15 13:40:20.373176178 +0200
--- Horde/Group/Ldap.php	2011-04-15 13:01:27.429584384 +0200
***************
*** 357,367 ****
      public function listGroups($user)
      {
          $attr = $this->_params['gid'];
  
  
!         try {
!             $filter = Horde_Ldap_Filter::create($this->_params['memberuid'],
                                                  'equals', $user);
              $search = $this->_ldap->search($this->_params['basedn'], $filter,
                                             array($attr));
          } catch (Horde_Ldap_Exception $e) {
--- 357,377 ----
      public function listGroups($user)
      {
          $attr = $this->_params['gid'];
+             if ($GLOBALS['conf']['group']['params']['attrisdn']) {
+ 		Horde::logMessage('User:' . $user, 'DEBUG');
+               $userDN =  $this->_ldap->findUserDN($user);
+ 		Horde::logMessage('UserDN:' . $userDN, 'DEBUG');
+               $filter = Horde_Ldap_Filter::create($this->_params['memberuid'],
+                                                 'equals', $userDN);
  
+             } else {
  
!               $filter = Horde_Ldap_Filter::create($this->_params['memberuid'],
                                                  'equals', $user);
+             }
+                 Horde::logMessage('listGroups Filter:' . $filter, 'DEBUG');
+ 
+         try {
              $search = $this->_ldap->search($this->_params['basedn'], $filter,
                                             array($attr));
          } catch (Horde_Ldap_Exception $e) {