created api for getting username

This commit is contained in:
Václav Šmejkal 2024-05-22 18:14:17 +02:00
parent 66b2ffb37a
commit bf951c25dc
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -0,0 +1,6 @@
<?php
session_start();
header('Content-type: application/json');
if (isset($_SESSION["username"])) echo json_encode(["username" => $_SESSION["username"]]);