version 3
This commit is contained in:
parent
23be5a5236
commit
e6825c0ee2
@ -11,7 +11,7 @@ function is_logged_in() {
|
|||||||
// Function to require a user to be logged in to access a page
|
// Function to require a user to be logged in to access a page
|
||||||
function require_login() {
|
function require_login() {
|
||||||
if (!is_logged_in()) {
|
if (!is_logged_in()) {
|
||||||
header('Location: /login.php');
|
header('Location: ../login.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ function is_admin() {
|
|||||||
function require_admin() {
|
function require_admin() {
|
||||||
if (!is_admin()) {
|
if (!is_admin()) {
|
||||||
// Redirect to portal index if not an admin
|
// Redirect to portal index if not an admin
|
||||||
header('Location: /portal');
|
header('Location: ../index.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user