You are here

public function LdapServerAdmin::drupalFormSubmit in Lightweight Directory Access Protocol (LDAP) 8.2

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

File

ldap_servers/LdapServerAdmin.class.php, line 462

Class

LdapServerAdmin

Code

public function drupalFormSubmit($op, $values) {
  $this
    ->populateFromDrupalForm($op, $values);
  if ($values['clear_bindpw']) {
    $this->bindpw_clear = TRUE;
  }
  if ($op == 'delete') {
    $this
      ->delete($this);
  }
  else {

    // add or edit
    try {
      $save_result = $this
        ->save($op);
    } catch (Exception $e) {
      $this
        ->setError('Save Error', t('Failed to save object.  Your form data was not saved.'));
    }
  }
}