mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Broke up the check_login.php require into several files seperated by function and then required them in the check_login
This commit is contained in:
11
includes/auth_check.php
Normal file
11
includes/auth_check.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
// Check user is logged in with a valid session
|
||||
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
||||
if ($_SERVER["REQUEST_URI"] == "/") {
|
||||
header("Location: ../login.php");
|
||||
} else {
|
||||
header("Location: ../login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
Reference in New Issue
Block a user