summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_usermanager_settings.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-30 21:42:30 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-30 21:42:30 +0545
commit73fa304bfc6ced005d8862be8dcbdab81aface9d (patch)
tree514e9385615938547030b76dd98d42999cee9279 /usr/local/www/system_usermanager_settings.php
parent417008f782aeab859f9e6fb98940105e86af4cdc (diff)
downloadpfsense-73fa304bfc6ced005d8862be8dcbdab81aface9d.zip
pfsense-73fa304bfc6ced005d8862be8dcbdab81aface9d.tar.gz
Code style system user manager
Diffstat (limited to 'usr/local/www/system_usermanager_settings.php')
-rw-r--r--usr/local/www/system_usermanager_settings.php36
1 files changed, 22 insertions, 14 deletions
diff --git a/usr/local/www/system_usermanager_settings.php b/usr/local/www/system_usermanager_settings.php
index 8965c69..cadfb08 100644
--- a/usr/local/www/system_usermanager_settings.php
+++ b/usr/local/www/system_usermanager_settings.php
@@ -49,39 +49,44 @@ $pconfig['authmode'] = &$config['system']['webgui']['authmode'];
$pconfig['backend'] = &$config['system']['webgui']['backend'];
// Page title for main admin
-$pgtitle = array(gettext("System"),gettext("User manager settings"));
+$pgtitle = array(gettext("System"), gettext("User manager settings"));
$save_and_test = false;
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
- if(isset($_POST['session_timeout'])) {
+ if (isset($_POST['session_timeout'])) {
$timeout = intval($_POST['session_timeout']);
- if ($timeout != "" && (!is_numeric($timeout) || $timeout <= 0))
+ if ($timeout != "" && (!is_numeric($timeout) || $timeout <= 0)) {
$input_errors[] = gettext("Session timeout must be an integer value.");
+ }
}
if (!$input_errors) {
if ($_POST['authmode'] != "local") {
$authsrv = auth_get_authserver($_POST['authmode']);
- if ($_POST['savetest'])
- if ($authsrv['type'] == "ldap")
+ if ($_POST['savetest']) {
+ if ($authsrv['type'] == "ldap") {
$save_and_test = true;
- else
+ } else {
$savemsg = gettext("The test was not performed because it is supported only for ldap based backends.");
+ }
+ }
}
- if(isset($_POST['session_timeout']) && $_POST['session_timeout'] != "")
+ if (isset($_POST['session_timeout']) && $_POST['session_timeout'] != "") {
$config['system']['webgui']['session_timeout'] = intval($_POST['session_timeout']);
- else
+ } else {
unset($config['system']['webgui']['session_timeout']);
+ }
- if($_POST['authmode'])
+ if ($_POST['authmode']) {
$config['system']['webgui']['authmode'] = $_POST['authmode'];
- else
+ } else {
unset($config['system']['webgui']['authmode']);
+ }
write_config();
@@ -97,7 +102,7 @@ include("head.inc");
<?php if ($savemsg) print_info_box($savemsg);?>
<?php
- if($save_and_test) {
+ if ($save_and_test) {
echo "<script type=\"text/javascript\">\n";
echo "//<![CDATA[\n";
echo "myRef = window.open('system_usermanager_settings_test.php?authserver={$pconfig['authmode']}','mywin', ";
@@ -120,8 +125,9 @@ include("head.inc");
display_top_tabs($tab_array);
/* Default to pfsense backend type if none is defined */
- if(!$pconfig['backend'])
+ if (!$pconfig['backend']) {
$pconfig['backend'] = "pfsense";
+ }
?>
</td>
</tr>
@@ -147,10 +153,12 @@ include("head.inc");
$auth_servers = auth_get_authserver_list();
foreach ($auth_servers as $auth_server):
$selected = "";
- if ($auth_server['name'] == $pconfig['authmode'])
+ if ($auth_server['name'] == $pconfig['authmode']) {
$selected = "selected=\"selected\"";
- if (!isset($pconfig['authmode']) && $auth_server['name'] == "Local Database")
+ }
+ if (!isset($pconfig['authmode']) && $auth_server['name'] == "Local Database") {
$selected = "selected=\"selected\"";
+ }
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<?php
OpenPOWER on IntegriCloud