fixed different login

This commit is contained in:
2026-01-28 20:14:49 +01:00
parent 73589b3b04
commit b55e9f483f
14 changed files with 587 additions and 138 deletions
+6 -2
View File
@@ -1,5 +1,10 @@
<?php
session_start();
// IMPORTANT: avoid redirect loop caused by require_school_context
define('SKIP_SCHOOL_CONTEXT', true);
include('include/headscript.php');
error_log("SELECT_SCHOOL HIT - user=" . ($_SESSION['iduserlogin'] ?? 'NOUSER') . " school=" . var_export($_SESSION['school_id'] ?? null, true));
@@ -160,7 +165,6 @@ if (count($userSchools) === 1) {
$_SESSION['school_id'] = (int)$userSchools[0]['id'];
$_SESSION['school_name'] = $userSchools[0]['name'];
$_SESSION['school_selected'] = 1;
if (function_exists('session')) {
session([
'school_id' => (int)$userSchools[0]['id'],
@@ -179,7 +183,7 @@ if (count($userSchools) > 1 && !empty($_SESSION['school_id']) && !empty($_SESSIO
exit;
}
/*
/*