the show starts kinda

This commit is contained in:
biglyderv 2024-11-27 00:13:33 -05:00
parent b1936f4d3a
commit 037d15b650
5 changed files with 67 additions and 12 deletions

View file

@ -2,7 +2,7 @@
require("../libs/test_secret.php");
function auth($token) {
if (is_null($token)) return '!guest';
if (is_null($token)) return null;
global $db;
@ -10,7 +10,7 @@
$stmt->execute([$token]);
$result = $stmt->fetch(PDO::FETCH_ASSOC);
if (!$result) return '!guest';
if (!$result) return null;
$username = $result['username'];
@ -18,7 +18,7 @@
$stmt->execute([$username]);
$result = $stmt->fetch(PDO::FETCH_ASSOC);
if (!$result) return '!guest';
if (!$result) return null;
return $username;
}