LdapUserGroupBackendForm: purge user_* settings

refs #10401
This commit is contained in:
Alexander A. Klimov 2016-10-21 11:48:39 +02:00
parent 00880710ed
commit 319f648b32
1 changed files with 13 additions and 0 deletions

View File

@ -92,6 +92,8 @@ class LdapUserGroupBackendForm extends Form
$this->createGroupConfigElements($defaults, $groupConfigDisabled);
if (count($userBackends) === 1 || (isset($formData['user_backend']) && $formData['user_backend'] === 'none')) {
$this->createUserConfigElements($defaults, $userConfigDisabled);
} else {
$this->createHiddenUserConfigElements();
}
$this->addElement(
@ -278,6 +280,17 @@ class LdapUserGroupBackendForm extends Form
);
}
/**
* Create and add all elements to this form required for the user configuration as hidden
*/
protected function createHiddenUserConfigElements()
{
$this->addElement('hidden', 'user_class', array('disabled' => true));
$this->addElement('hidden', 'user_filter', array('disabled' => true));
$this->addElement('hidden', 'user_name_attribute', array('disabled' => true));
$this->addElement('hidden', 'user_base_dn', array('disabled' => true));
}
/**
* Return the names of all configured LDAP resources
*