You are here

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

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

File

ldap_servers/LdapServerAdmin.class.php, line 471

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.'));
    }
  }
}