the show starts kinda
This commit is contained in:
parent
b1936f4d3a
commit
037d15b650
5 changed files with 67 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>NewBiglyChat</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue