diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-03-18 10:58:49 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-03-18 10:58:49 -0300 |
commit | 86e41adf983b5db77fc5629a410dc8e1dff00042 (patch) | |
tree | da375551a6277a054d921b9e81d7fd7e4761f0c9 | |
parent | 2d78048e72fc1751f1e7952a1f30daa2db279737 (diff) | |
parent | 926e0a2fca6ae143665d18482cc62dac23c814b6 (diff) | |
download | pfsense-86e41adf983b5db77fc5629a410dc8e1dff00042.zip pfsense-86e41adf983b5db77fc5629a410dc8e1dff00042.tar.gz |
Merge pull request #1571 from phil-davis/patch-2
-rw-r--r-- | usr/local/www/system_usermanager.php | 4 |
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")) |