protected function bindToServer() : void
    {
        $success = @ldap_bind($this->handle, $this->configuration['username'] . '@' . $this->configuration['domain'],
            $this->configuration['password']);
        if (!$success) {
            $this->logger->error('LDAP failed: ' . ldap_err2str(ldap_errno($this->handle)));
            if (ldap_errno($this->handle) == '49') {
                throw new DatabaseConnectionException('Unable to connect to LDAP server.');
            } else {
                throw new DatabaseConnectionException('A problem occurred when binding to the LDAP server.');
            }
        }
    }