summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-03-18 10:58:49 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-03-18 10:58:49 -0300
commit86e41adf983b5db77fc5629a410dc8e1dff00042 (patch)
treeda375551a6277a054d921b9e81d7fd7e4761f0c9
parent2d78048e72fc1751f1e7952a1f30daa2db279737 (diff)
parent926e0a2fca6ae143665d18482cc62dac23c814b6 (diff)
downloadpfsense-86e41adf983b5db77fc5629a410dc8e1dff00042.zip
pfsense-86e41adf983b5db77fc5629a410dc8e1dff00042.tar.gz
Merge pull request #1571 from phil-davis/patch-2
-rw-r--r--usr/local/www/system_usermanager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index 9fce497..1bc91ad 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -299,7 +299,7 @@ if ($_POST['save']) {
isset($_POST['utype']) ? $userent['scope'] = $_POST['utype'] : $userent['scope'] = "system";
/* the user name was modified */
- if ($_POST['usernamefld'] <> $_POST['oldusername']) {
+ if (!empty($_POST['oldusername']) && ($_POST['usernamefld'] <> $_POST['oldusername'])) {
$_SERVER['REMOTE_USER'] = $_POST['usernamefld'];
local_user_del($userent);
}
@@ -361,8 +361,8 @@ if ($_POST['save']) {
$a_user[] = $userent;
}
- local_user_set_groups($userent,$_POST['groups']);
local_user_set($userent);
+ local_user_set_groups($userent,$_POST['groups']);
write_config();
if(is_dir("/etc/inc/privhooks"))
OpenPOWER on IntegriCloud