Commit
This commit is contained in:
parent
a13fd59373
commit
86f8e8084b
@ -22,7 +22,6 @@ spl_autoload_register(function ($class_name) {
|
|||||||
|
|
||||||
/* === App Setup === */
|
/* === App Setup === */
|
||||||
|
|
||||||
|
|
||||||
// Displays a custom page on error or exception
|
// Displays a custom page on error or exception
|
||||||
new ErrorHandler;
|
new ErrorHandler;
|
||||||
|
|
||||||
@ -40,6 +39,8 @@ $session = new Session;
|
|||||||
// Handles current user session
|
// Handles current user session
|
||||||
$user = new User($session, $database);
|
$user = new User($session, $database);
|
||||||
|
|
||||||
|
// THIS IS IMPORTANT!!
|
||||||
|
// Without it, everyone will have access to any page without having to be logged in.
|
||||||
// Decides if the user is allowed to view current page
|
// Decides if the user is allowed to view current page
|
||||||
new AccessControl($user, $config['root_url']);
|
new AccessControl($user, $config['root_url']);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user