summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-05 16:55:55 +0000
committerErmal <eri@pfsense.org>2013-01-05 16:55:55 +0000
commit184847b5d144abcdad2f1d75d641c6d94235b75f (patch)
tree7957e004639e30f2fe02c83e291af0dc6714a663 /etc/inc/config.lib.inc
parentcf0dae69a13300e34ab7d3b6203f048debf58ff5 (diff)
downloadpfsense-184847b5d144abcdad2f1d75d641c6d94235b75f.zip
pfsense-184847b5d144abcdad2f1d75d641c6d94235b75f.tar.gz
While here try to hint the user from _ENV['USER'] if no session info
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r--etc/inc/config.lib.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index e258510..d4f4b5e 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -509,7 +509,7 @@ function write_config($desc="Unknown", $backup = true) {
}
}
- $username = empty($_SESSION["Username"]) ? "(system)" : $_SESSION['Username'];
+ $username = !empty($_SESSION["Username"]) ? $_SESSION['Username'] : empty($_ENV['USER']) ? "(system)" : $_ENV['USER'];
if (!empty($_SERVER['REMOTE_ADDR']))
$username .= '@' . $_SERVER['REMOTE_ADDR'];
OpenPOWER on IntegriCloud