roundcubemail/program/lib/Roundcube/rcube_ldap.php
private function _list_group_memberurl($dn, $entry, $count)
    {
        $group_members = array();

        for ($i=0; $i < $entry['memberurl']['count']; $i++) {
            // extract components from url
            if (!preg_match('!ldap://[^/]*/([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m)) {
                continue;
            }

            // add search filter if any
            $filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3];
            $attrs = $count ? array('dn','objectClass') : $this->prop['list_attributes'];
            if ($result = $this->ldap->search($m[1], $filter, $m[2], $attrs, $this->group_data)) {
                $entries = $result->entries();
                for ($j = 0; $j < $entries['count']; $j++) {
                    if ($this->is_group_entry($entries[$j]) && ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count)))
                        $group_members = array_merge($group_members, $nested_group_members);
                    else
                        $group_members[] = $entries[$j];
                }
            }
        }

        return $group_members;
    }
private function _list_group_memberurl($dn, $entry, $count)
    {
        $group_members = array();

        for ($i=0; $i < $entry['memberurl']['count']; $i++) {
            // extract components from url
            if (!preg_match('!ldap://[^/]*/([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m)) {
                continue;
            }

            // add search filter if any
            $filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3];
            $attrs = $count ? array('dn','objectClass') : $this->prop['list_attributes'];
            if ($result = $this->ldap->search($m[1], $filter, $m[2], $attrs, $this->group_data)) {
                $entries = $result->entries();
                for ($j = 0; $j < $entries['count']; $j++) {
                    if ($this->is_group_entry($entries[$j]) && ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count)))
                        $group_members = array_merge($group_members, $nested_group_members);
                    else
                        $group_members[] = $entries[$j];
                }
            }
        }

        return $group_members;
    }
private function _list_group_memberurl ( $ dn , $ entry , $ count ) { $ group_members = array ( ) ; for ( $ i = 0 ; $ i < $ entry [ 'memberurl' ] [ 'count' ] ; $ i ++ ) { // extract components from url if ( ! preg_match ( '!ldap://[^/]*/([^\?]+)\?\?(\w+)\?(.*)$!' , $ entry [ 'memberurl' ] [ $ i ] , $ m ) ) { continue ; } // add search filter if any $ filter = $ this -> filter ? '(&(' . $ m [ 3 ] . ')(' . $ this -> filter . '))' : $ m [ 3 ] ; $ attrs = $ count ? array ( 'dn' , 'objectClass' ) : $ this -> prop [ 'list_attributes' ] ; if ( $ result = $ this -> ldap -> search ( $ m [ 1 ] , $ filter , $ m [ 2 ] , $ attrs , $ this -> group_data ) ) { $ entries = $ result -> entries ( ) ; for ( $ j = 0 ; $ j < $ entries [ 'count' ] ; $ j ++ ) { if ( $ this -> is_group_entry ( $ entries [ $ j ] ) && ( $ nested_group_members = $ this -> list_group_members ( $ entries [ $ j ] [ 'dn' ] , $ count ) ) ) $ group_members = array_merge ( $ group_members , $ nested_group_members ) ; else $ group_members [ ] = $ entries [ $ j ] ; } } } return $ group_members ; }
List members of group class groupOfUrls

@param string Group DN
@param array  Group entry
@param boolean True if only used for counting
@return array Accumulated group members
List members of group class groupOfUrls