created api for getting username
This commit is contained in:
parent
66b2ffb37a
commit
bf951c25dc
6
res/forum/api/get_username.php
Normal file
6
res/forum/api/get_username.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
header('Content-type: application/json');
|
||||
if (isset($_SESSION["username"])) echo json_encode(["username" => $_SESSION["username"]]);
|
Loading…
x
Reference in New Issue
Block a user