roundcubemail/program/lib/Roundcube/rcube_ldap.php
private function get_group_entry($group_id)
    {
        $group_cache = $this->_fetch_groups();

        // add group record to cache if it isn't yet there
        if (!isset($group_cache[$group_id])) {
            $name_attr = $this->prop['groups']['name_attr'];
            $dn = self::dn_decode($group_id);

            if ($list = $this->ldap->read_entries($dn, '(objectClass=*)', array('dn','objectClass','member','uniqueMember','memberURL',$name_attr,$this->fieldmap['email']))) {
                $entry = $list[0];
                $group_name = is_array($entry[$name_attr]) ? $entry[$name_attr][0] : $entry[$name_attr];
                $group_cache[$group_id]['ID'] = $group_id;
                $group_cache[$group_id]['dn'] = $dn;
                $group_cache[$group_id]['name'] = $group_name;
                $group_cache[$group_id]['member_attr'] = $this->get_group_member_attr($entry['objectclass']);
            }
            else {
                $group_cache[$group_id] = false;
            }

            if ($this->cache) {
                $this->cache->set('groups', $group_cache);
            }
        }

        return $group_cache[$group_id];
    }
private function get_group_entry($group_id)
    {
        $group_cache = $this->_fetch_groups();

        // add group record to cache if it isn't yet there
        if (!isset($group_cache[$group_id])) {
            $name_attr = $this->prop['groups']['name_attr'];
            $dn = self::dn_decode($group_id);

            if ($list = $this->ldap->read_entries($dn, '(objectClass=*)', array('dn','objectClass','member','uniqueMember','memberURL',$name_attr,$this->fieldmap['email']))) {
                $entry = $list[0];
                $group_name = is_array($entry[$name_attr]) ? $entry[$name_attr][0] : $entry[$name_attr];
                $group_cache[$group_id]['ID'] = $group_id;
                $group_cache[$group_id]['dn'] = $dn;
                $group_cache[$group_id]['name'] = $group_name;
                $group_cache[$group_id]['member_attr'] = $this->get_group_member_attr($entry['objectclass']);
            }
            else {
                $group_cache[$group_id] = false;
            }

            if ($this->cache) {
                $this->cache->set('groups', $group_cache);
            }
        }

        return $group_cache[$group_id];
    }
private function get_group_entry ( $ group_id ) { $ group_cache = $ this -> _fetch_groups ( ) ; // add group record to cache if it isn't yet there if ( ! isset ( $ group_cache [ $ group_id ] ) ) { $ name_attr = $ this -> prop [ 'groups' ] [ 'name_attr' ] ; $ dn = self :: dn_decode ( $ group_id ) ; if ( $ list = $ this -> ldap -> read_entries ( $ dn , '(objectClass=*)' , array ( 'dn' , 'objectClass' , 'member' , 'uniqueMember' , 'memberURL' , $ name_attr , $ this -> fieldmap [ 'email' ] ) ) ) { $ entry = $ list [ 0 ] ; $ group_name = is_array ( $ entry [ $ name_attr ] ) ? $ entry [ $ name_attr ] [ 0 ] : $ entry [ $ name_attr ] ; $ group_cache [ $ group_id ] [ 'ID' ] = $ group_id ; $ group_cache [ $ group_id ] [ 'dn' ] = $ dn ; $ group_cache [ $ group_id ] [ 'name' ] = $ group_name ; $ group_cache [ $ group_id ] [ 'member_attr' ] = $ this -> get_group_member_attr ( $ entry [ 'objectclass' ] ) ; } else { $ group_cache [ $ group_id ] = false ; } if ( $ this -> cache ) { $ this -> cache -> set ( 'groups' , $ group_cache ) ; } } return $ group_cache [ $ group_id ] ; }
Fetch a group entry from LDAP and save in local cache
Fetch a group entry from LDAP and save in local cache