diff options
author | Ermal <eri@pfsense.org> | 2013-01-05 16:55:55 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-05 16:55:55 +0000 |
commit | 184847b5d144abcdad2f1d75d641c6d94235b75f (patch) | |
tree | 7957e004639e30f2fe02c83e291af0dc6714a663 | |
parent | cf0dae69a13300e34ab7d3b6203f048debf58ff5 (diff) | |
download | pfsense-184847b5d144abcdad2f1d75d641c6d94235b75f.zip pfsense-184847b5d144abcdad2f1d75d641c6d94235b75f.tar.gz |
While here try to hint the user from _ENV['USER'] if no session info
-rw-r--r-- | etc/inc/config.lib.inc | 2 |
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']; |