kernel/lib/Ldap.php
public function getGroups() : array
    {
        $rSearch = ldap_search( $this->_rConnect , $this->_sBase , "objectclass=group" , array("cn") );
        $aEntries = ldap_get_entries($this->_rConnect, $rSearch);
        $aGroups = array();

        for ( $i = 0 ; $i < $aEntries["count"] ; $i++ ) {
            
            $aGroups[] = utf8_encode($aEntries[$i]["dn"]);
        }

        return $aGroups;
    }
public function getGroups() : array
    {
        $rSearch = ldap_search( $this->_rConnect , $this->_sBase , "objectclass=group" , array("cn") );
        $aEntries = ldap_get_entries($this->_rConnect, $rSearch);
        $aGroups = array();

        for ( $i = 0 ; $i < $aEntries["count"] ; $i++ ) {
            
            $aGroups[] = utf8_encode($aEntries[$i]["dn"]);
        }

        return $aGroups;
    }
public function getGroups ( ) : array { $ rSearch = ldap_search ( $ this -> _rConnect , $ this -> _sBase , "objectclass=group" , array ( "cn" ) ) ; $ aEntries = ldap_get_entries ( $ this -> _rConnect , $ rSearch ) ; $ aGroups = array ( ) ; for ( $ i = 0 ; $ i < $ aEntries [ "count" ] ; $ i ++ ) { $ aGroups [ ] = utf8_encode ( $ aEntries [ $ i ] [ "dn" ] ) ; } return $ aGroups ; }
Get groups

@access public
@return array
Get groups