public function recursiveGroups($groupName)
    {
        $groups = [];

        $info = $this->find($groupName);

        if (is_array($info) && array_key_exists('cn', $info)) {
            $groups[] = $info['cn'];

            if (array_key_exists('memberof', $info)) {
                if (is_array($info['memberof'])) {
                    foreach ($info['memberof'] as $group) {
                        $explodedDn = $this->connection->explodeDn($group);

                        $groups = array_merge($groups, $this->recursiveGroups($explodedDn[0]));
                    }
                }
            }
        }

        return $groups;
    }