AuthBackendPage: Fix that re-populating the chosen LDAP type has no effect
...
This commit is contained in:
parent
eb4e56fbc0
commit
87deda86be
|
@ -71,6 +71,12 @@ class AuthBackendPage extends Form
|
|||
. 'to do now is defining a name for your first authentication backend.'
|
||||
));
|
||||
} elseif ($this->config['type'] === 'ldap') {
|
||||
$type = null;
|
||||
if (! isset($formData['type']) && isset($formData['backend'])) {
|
||||
$type = $formData['backend'];
|
||||
$formData['type'] = $type;
|
||||
}
|
||||
|
||||
$backendForm = new LdapBackendForm();
|
||||
$backendForm->setResources(array($this->config['name']));
|
||||
$backendForm->create($formData);
|
||||
|
@ -94,7 +100,7 @@ class AuthBackendPage extends Form
|
|||
'ldap' => 'LDAP',
|
||||
'msldap' => 'ActiveDirectory'
|
||||
),
|
||||
'value' => isset($formData['backend']) ? $formData['backend'] : null
|
||||
'value' => $type
|
||||
)
|
||||
);
|
||||
} else { // $this->config['type'] === 'external'
|
||||
|
|
|
@ -138,9 +138,11 @@ class WebWizard extends Wizard implements SetupWizard
|
|||
} elseif ($authData['type'] === 'ldap') {
|
||||
$page->setResourceConfig($this->getPageData('setup_ldap_resource'));
|
||||
|
||||
$suggestions = $this->getPageData('setup_ldap_discovery');
|
||||
if (isset($suggestions['backend'])) {
|
||||
$page->populate($suggestions['backend']);
|
||||
if (! $this->hasPageData('setup_authentication_backend')) {
|
||||
$suggestions = $this->getPageData('setup_ldap_discovery');
|
||||
if (isset($suggestions['backend'])) {
|
||||
$page->populate($suggestions['backend']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->getDirection() === static::FORWARD) {
|
||||
|
|
Loading…
Reference in New Issue