src/Classes/AdldapGroups.php
public function members($group, $fields = [])
    {
        $group = $this->find($group);

        if (is_array($group) && array_key_exists('member', $group)) {
            $members = [];

            foreach ($group['member'] as $member) {
                $members[] = $this->adldap->search()
                    ->setDn($member)
                    ->select($fields)
                    ->where('objectClass', '=', 'user')
                    ->where('objectClass', '=', 'person')
                    ->first();
            }

            return $members;
        }

        return false;
    }
public function members($group, $fields = [])
    {
        $group = $this->find($group);

        if (is_array($group) && array_key_exists('member', $group)) {
            $members = [];

            foreach ($group['member'] as $member) {
                $members[] = $this->adldap->search()
                    ->setDn($member)
                    ->select($fields)
                    ->where('objectClass', '=', 'user')
                    ->where('objectClass', '=', 'person')
                    ->first();
            }

            return $members;
        }

        return false;
    }
public function members ( $ group , $ fields = [ ] ) { $ group = $ this -> find ( $ group ) ; if ( is_array ( $ group ) && array_key_exists ( 'member' , $ group ) ) { $ members = [ ] ; foreach ( $ group [ 'member' ] as $ member ) { $ members [ ] = $ this -> adldap -> search ( ) -> setDn ( $ member ) -> select ( $ fields ) -> where ( 'objectClass' , '=' , 'user' ) -> where ( 'objectClass' , '=' , 'person' ) -> first ( ) ; } return $ members ; } return false ; }
Return a list of members in a group.

@param string $group  The group to query
@param array  $fields The fields to retrieve for each member

@return array|bool
Return a list of members in a group .