BookDepot/authfunctions.php
2024-11-10 16:10:07 -05:00

17 lines
497 B
PHP

<?php
//
// This function is called at the beginning of any pages where
// user login is required. Feel free to change the logic between
// the lines indicated below.
//
function require_login () {
if ( !$_SESSION['validated'] ) {
// ******** START OF AUTH LOGIC ********
$_SESSION['appurl'] = $_SERVER['REQUEST_URI'];
header('Location: /jajauth/login.php');
exit();
// ********* END OF AUTH LOGIC *********
}
}