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

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

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