summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index e358827..f9b9d21 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -1098,12 +1098,14 @@ function session_auth() {
$_SESSION['Username'] = $_POST['usernamefld'];
$_SESSION['last_access'] = time();
log_error("Successful login for user '{$_POST['usernamefld']}' from: {$_SERVER['REMOTE_ADDR']}");
- require_once("functions.inc");
$HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
if (isset($_POST['postafterlogin']))
return true;
- else
- pfSenseHeader("/{$page}");
+ else {
+ if (empty($page))
+ $page = "/";
+ header("Location: {$page}");
+ }
exit;
} else {
/* give the user an error message */
OpenPOWER on IntegriCloud