function logout_connexion()
{
global $_POST;
global $sql;
// User id
$id_user = $_POST['userID'];
$header = apache_request_headers();
$tokenUser = str_replace('Bearer ', '', $header['Authorization']);
// Condition pour Flutterflow qui met "Authorization" en minuscule.
if (empty($tokenUser)) {
$tokenUser = str_replace('Bearer ', '', $header['authorization']);
}
$query = " SELECT att4 as tokenUser, att5 as tokenTimestamp FROM my_user WHERE user_id = " . $id_user . " ";
// ... (truncated)