Suggest LDAP backend type based on the discovery (if any)

refs #3004
This commit is contained in:
Alexander A. Klimov 2017-10-09 13:00:05 +02:00
parent 6f37485c8d
commit 4b9a30755f

View File

@ -79,9 +79,12 @@ class AuthBackendPage extends Form
)); ));
} elseif ($this->config['type'] === 'ldap') { } elseif ($this->config['type'] === 'ldap') {
$type = null; $type = null;
if (! isset($formData['type']) && isset($formData['backend'])) { if (! isset($formData['type'])) {
$type = $formData['backend']; if (isset($formData['backend'])) {
$formData['type'] = $type; $formData['type'] = $type = $formData['backend'];
} elseif (isset($this->suggestions['backend'])) {
$formData['type'] = $type = $this->suggestions['backend'];
}
} }
$backendForm = new LdapBackendForm(); $backendForm = new LdapBackendForm();