Schone start na index corruptie
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Fociz Integraties Doorverwijzer
|
||||
* Beheerders worden automatisch doorgeleid naar Systeembeheer (/admin.php).
|
||||
* Collega's worden automatisch doorgeleid naar hun Persoonlijk Profiel (/profile.php).
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/includes/auth.php';
|
||||
|
||||
$user = require_auth();
|
||||
|
||||
$queryString = !empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '';
|
||||
|
||||
if ($user['role'] === 'ADMIN') {
|
||||
header('Location: /admin.php' . $queryString);
|
||||
} else {
|
||||
header('Location: /profile.php' . $queryString);
|
||||
}
|
||||
exit;
|
||||
Reference in New Issue
Block a user