AuthBackendPage: Do only create a resource config if necessary

This commit is contained in:
Johannes Meyer 2015-07-02 10:18:37 +02:00
parent 3b63868ed9
commit f0d7629209
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class AuthBackendPage extends Form
return false;
}
if (false === isset($data['skip_validation']) || $data['skip_validation'] == 0) {
if ($this->config['type'] === 'ldap' && ( !isset($data['skip_validation']) || $data['skip_validation'] == 0)) {
$self = clone $this;
$self->addElement(
'text',
@ -130,7 +130,7 @@ class AuthBackendPage extends Form
'value' => $this->getResourceConfig()
)
);
if ($this->config['type'] === 'ldap' && false === LdapBackendForm::isValidUserBackend($self)) {
if (! LdapBackendForm::isValidUserBackend($self)) {
$this->addSkipValidationCheckbox();
return false;
}