Merge branch 'bugfix/ldapusergroupbackendform-user_-settings-not-purged-10401'
fixes #10401
This commit is contained in:
commit
39e4a39654
|
@ -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,19 @@ class LdapUserGroupBackendForm extends Form
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and add all elements for the user configuration as hidden inputs
|
||||
*
|
||||
* This is required to purge already present options when unlinking a group backend with a user backend.
|
||||
*/
|
||||
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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue