public function LdapServerAdmin::drupalFormValidate in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::drupalFormValidate()
- 7.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::drupalFormValidate()
File
- ldap_servers/
LdapServerAdmin.class.php, line 322
Class
Code
public function drupalFormValidate($op, $values) {
$errors = array();
if ($op == 'delete') {
if (!$this->sid) {
$errors['server_id_missing'] = 'Server id missing from delete form.';
}
$warnings = module_invoke_all('ldap_server_in_use', $this->sid, $this->name);
if (count($warnings)) {
$errors['status'] = join("<br/>", array_values($warnings));
}
}
else {
$this
->populateFromDrupalForm($op, $values);
$errors = $this
->validate($op);
}
return $errors;
}