From 7601143feb21012d047f180a31d74d41e929df72 Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Sat, 27 Jan 2024 15:27:09 +1100 Subject: [PATCH] Header with loginName --- gatherling/api.php | 1 + gatherling/lib.php | 1 + 2 files changed, 2 insertions(+) diff --git a/gatherling/api.php b/gatherling/api.php index 1b130efca..05f2cbf5f 100644 --- a/gatherling/api.php +++ b/gatherling/api.php @@ -60,6 +60,7 @@ case 'delplayer': case 'delete_player': + auth(); $event = new Event($_GET['event']); $player = $_GET['delplayer']; $result = delete_player_from_event($event, $player); diff --git a/gatherling/lib.php b/gatherling/lib.php index adc6cecc2..c9d6e0a74 100644 --- a/gatherling/lib.php +++ b/gatherling/lib.php @@ -385,6 +385,7 @@ function json_headers() header('Cache-Control: no-cache'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Access-Control-Allow-Origin: *'); + header('HTTP_X_USERNAME: '.Player::loginName()); } function distance_of_time_in_words($from_time, $to_time = 0, $truncate = false)