summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-29 16:48:10 +0000
committerErmal <eri@pfsense.org>2010-03-29 16:48:10 +0000
commit9a985f9e4bb5ecd6b985d0e7e471d0d4240068ce (patch)
treedc67ca283adecb1b7d3f17522bb0e3cb5266128a /etc/inc/auth.inc
parent62e74b4261b4044f523ade7c3b45e4484bbd2f8d (diff)
downloadpfsense-9a985f9e4bb5ecd6b985d0e7e471d0d4240068ce.zip
pfsense-9a985f9e4bb5ecd6b985d0e7e471d0d4240068ce.tar.gz
Simplify code.
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 7b500d6..908b380 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -1103,14 +1103,13 @@ function session_auth() {
return false;
/* If session timeout isn't set, we don't mark sessions stale */
- if (!isset($config['system']['webgui']['session_timeout'])) {
+ if (empty($config['system']['webgui']['session_timeout'])) {
/* Default to 4 hour timeout if one is not set */
if ($_SESSION['last_access'] < (time() - 14400)) {
$_GET['logout'] = true;
$_SESSION['Logout'] = true;
- }
- } else if (empty($config['system']['webgui']['session_timeout'])) {
- $_SESSION['last_access'] = time();
+ } else
+ $_SESSION['last_access'] = time();
} else {
/* Check for stale session */
if ($_SESSION['last_access'] < (time() - ($config['system']['webgui']['session_timeout'] * 60))) {
OpenPOWER on IntegriCloud