public function getEntries($search)
    {
        $entries = ldap_get_entries($this->connect, $search);

        array_walk_recursive($entries, function (&$item) {
            if (!mb_detect_encoding($item, 'utf-8', true)) {
                $item = utf8_encode($item);
            }
        });

        return $entries;
    }