protected function doLdapQuery($anonymous)
{
if ($anonymous) {
$this->connection->connect('', '', true);
}
$schema = $this->schemaFactory->get(self::SCHEMA_ROOTDSE_NAME, $this->connection->getConfig()->getLdapType());
return (new LdapQueryBuilder($this->connection))->from($schema)->select('*')->getLdapQuery()->getSingleResult();
}