public function delete($dn) {
    if (!$this->connection) {
      $this->connect();
      $this->bind();
    }
    $result = @ldap_delete($this->connection, $dn);
    if (!$result) {
      $error = "LDAP Server delete(%dn) in LdapServer::delete() Error Server ID = %sid, LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str ";
      $tokens = array('%dn' => $dn, '%sid' => $this->sid, '%ldap_errno' => ldap_errno($this->connection), '%ldap_err2str' => ldap_err2str(ldap_errno($this->connection)));
      watchdog('ldap_server', $error, $tokens, WATCHDOG_ERROR);
    }
    return $result;
  }
public function delete($dn) {
    if (!$this->connection) {
      $this->connect();
      $this->bind();
    }
    $result = @ldap_delete($this->connection, $dn);
    if (!$result) {
      $error = "LDAP Server delete(%dn) in LdapServer::delete() Error Server ID = %sid, LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str ";
      $tokens = array('%dn' => $dn, '%sid' => $this->sid, '%ldap_errno' => ldap_errno($this->connection), '%ldap_err2str' => ldap_err2str(ldap_errno($this->connection)));
      watchdog('ldap_server', $error, $tokens, WATCHDOG_ERROR);
    }
    return $result;
  }
public function delete ( $ dn ) { if ( ! $ this -> connection ) { $ this -> connect ( ) ; $ this -> bind ( ) ; } $ result = @ ldap_delete ( $ this -> connection , $ dn ) ; if ( ! $ result ) { $ error = "LDAP Server delete(%dn) in LdapServer::delete() Error Server ID = %sid, LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str " ; $ tokens = array ( '%dn' => $ dn , '%sid' => $ this -> sid , '%ldap_errno' => ldap_errno ( $ this -> connection ) , '%ldap_err2str' => ldap_err2str ( ldap_errno ( $ this -> connection ) ) ) ; watchdog ( 'ldap_server' , $ error , $ tokens , WATCHDOG_ERROR ) ; } return $ result ; }
Perform an LDAP delete.

@param string $dn

@return boolean result per ldap_delete
Perform an LDAP delete .