diff --git a/application/forms/Config/AuthenticationBackendConfigForm.php b/application/forms/Config/AuthenticationBackendConfigForm.php index 3cbd4b48e..8169b10f7 100644 --- a/application/forms/Config/AuthenticationBackendConfigForm.php +++ b/application/forms/Config/AuthenticationBackendConfigForm.php @@ -281,7 +281,7 @@ class AuthenticationBackendConfigForm extends ConfigForm public function createElements(array $formData) { $backendTypes = array(); - $backendType = isset($formData['type']) ? $formData['type'] : 'db'; + $backendType = isset($formData['type']) ? $formData['type'] : null; if (isset($this->resources['db'])) { $backendTypes['db'] = t('Database'); @@ -300,6 +300,10 @@ class AuthenticationBackendConfigForm extends ConfigForm $backendTypes['autologin'] = t('Autologin'); } + if ($backendType === null) { + $backendType = key($backendTypes); + } + $this->addElement( 'select', 'type',