protected function LdapQueryAdmin::validate in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::validate()
- 7.2 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::validate()
1 call to LdapQueryAdmin::validate()
- LdapQueryAdmin::drupalFormValidate in ldap_query/
LdapQueryAdmin.class.php
File
- ldap_query/
LdapQueryAdmin.class.php, line 244
Class
Code
protected function validate($op) {
$errors = array();
if ($op == 'add') {
$ldap_queries = $this
->getLdapQueryObjects('all', 'all');
if (count($ldap_queries)) {
foreach ($ldap_queries as $qid => $ldap_query) {
if ($this->qid == $ldap_query->qid) {
$errors['qid'] = t('An LDAP Query with the name %qid already exists.', array(
'%qid' => $this->qid,
));
}
}
}
}
return $errors;
}