You are here

public function LdapServerAdmin::delete in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::delete()
  2. 7 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::delete()

Perform an LDAP delete.

Parameters

string $dn:

Return value

boolean result per ldap_delete

Overrides LdapServer::delete

1 call to LdapServerAdmin::delete()
LdapServerAdmin::drupalFormSubmit in ldap_servers/LdapServerAdmin.class.php

File

ldap_servers/LdapServerAdmin.class.php, line 181

Class

LdapServerAdmin

Code

public function delete($sid) {
  if ($sid == $this->sid) {
    $result = db_delete('ldap_servers')
      ->condition('sid', $sid)
      ->execute();
    if (module_exists('ctools')) {
      ctools_include('export');

      // Invalidate cache.
      ctools_export_load_object_reset('ldap_servers');
    }
    $this->inDatabase = FALSE;
    return $result;
  }
  else {
    return FALSE;
  }
}