Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
+4
-1
@@ -14,7 +14,10 @@
|
||||
*/
|
||||
|
||||
session_start();
|
||||
if ($_SESSION['uid'] != 2) header("Location: index.php");
|
||||
if ($_SESSION['uid'] != 2) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'config.php';
|
||||
|
||||
$user = new \Battles\User($_SESSION['uid']);
|
||||
|
||||
Reference in New Issue
Block a user