diff options
author | Phil Davis <phil.davis@inf.org> | 2015-11-15 17:20:04 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-11-15 17:20:04 +0545 |
commit | 08d6f8ff2a381716492aa8fe0c34c1d593d15f8c (patch) | |
tree | b441f9ed47540b929d1eb2cd6685181c79ef240b | |
parent | c670525f0455c4cd7bf7486a12688441339cb6d3 (diff) | |
download | pfsense-08d6f8ff2a381716492aa8fe0c34c1d593d15f8c.zip pfsense-08d6f8ff2a381716492aa8fe0c34c1d593d15f8c.tar.gz |
Backport Redmine #5440 to RELENG_2_2
The code in RELENG_2_2 for system_usermanager_settings.php seems to work OK in RELENG_2_2 so I did not touch anything there.
But diag_authentication.php had nothing about $pconfig on initial page load. This extra code makes it select a reasonable default auth server when the page first loads. After that, each time the user does "Test", the page comes back with the previously selected auth server, user name and password (like it did already) - so that seems good.
-rw-r--r-- | usr/local/www/diag_authentication.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php index 24d567e..a4c9290 100644 --- a/usr/local/www/diag_authentication.php +++ b/usr/local/www/diag_authentication.php @@ -66,6 +66,14 @@ if ($_POST) { $input_errors[] = gettext("Authentication failed."); } } +} else { + // Choose a reasonable initial default. + if (isset($config['system']['webgui']['authmode'])) { + $pconfig['authmode'] = $config['system']['webgui']['authmode']; + } + else { + $pconfig['authmode'] = "Local Database"; + } } $pgtitle = array(gettext("Diagnostics"),gettext("Authentication")); $shortcut_section = "authentication"; |