summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-04-11 10:46:41 -0400
committerjim-p <jimp@pfsense.org>2012-04-11 10:46:41 -0400
commitfdcf104ce4f5320a5a182a0c4b378174959a7caf (patch)
tree86db94649a3156bba8be59dd946d49e871fab5ae /usr/local
parent2fe06a3228848a9714a0488a4468d895f20b7a63 (diff)
downloadpfsense-fdcf104ce4f5320a5a182a0c4b378174959a7caf.zip
pfsense-fdcf104ce4f5320a5a182a0c4b378174959a7caf.tar.gz
When renaming a user, make sure to remove the previous user or it gets left in /etc/passwd.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/system_usermanager.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index 2051a60..68ac908 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -268,8 +268,10 @@ if ($_POST) {
isset($_POST['utype']) ? $userent['scope'] = $_POST['utype'] : $userent['scope'] = "system";
/* the user name was modified */
- if ($_POST['usernamefld'] <> $_POST['oldusername'])
+ if ($_POST['usernamefld'] <> $_POST['oldusername']) {
$_SERVER['REMOTE_USER'] = $_POST['usernamefld'];
+ local_user_del($userent);
+ }
/* the user password was mofified */
if ($_POST['passwordfld1'])
OpenPOWER on IntegriCloud