Removes hardcoded "register" page
parent
26817c1bb6
commit
af8d86321f
|
@ -113,7 +113,6 @@ $allowed_urls = [
|
||||||
|
|
||||||
'login',
|
'login',
|
||||||
'logout',
|
'logout',
|
||||||
'register',
|
|
||||||
|
|
||||||
'about',
|
'about',
|
||||||
];
|
];
|
||||||
|
@ -156,7 +155,7 @@ if ($config_file) {
|
||||||
$app_root = $config['folder'];
|
$app_root = $config['folder'];
|
||||||
|
|
||||||
// List of pages that don't require authentication
|
// List of pages that don't require authentication
|
||||||
$public_pages = ['login', 'register', 'help', 'about'];
|
$public_pages = ['login', 'help', 'about'];
|
||||||
|
|
||||||
// Check if the requested page requires authentication
|
// Check if the requested page requires authentication
|
||||||
if (!isset($_COOKIE['username']) && !$validSession && !in_array($page, $public_pages)) {
|
if (!isset($_COOKIE['username']) && !$validSession && !in_array($page, $public_pages)) {
|
||||||
|
|
Loading…
Reference in New Issue