Improve security
Change-Id: Ia98bb629c8c81f609d3a5e4d023616a95f9c4248
diff --git a/index.php b/index.php
index ad7b1ea..af824ee 100644
--- a/index.php
+++ b/index.php
@@ -70,7 +70,7 @@
fetch("./ajax/getusers.php").then(result => result.json()).then(users => {
autocomplete(document.getElementById("search-input"), users, "search");
- userid = <?=isset($_COOKIE['user']) ? (int)$_COOKIE['user'] : -1 ?>;
+ userid = <?=isset($_SESSION['id']) ? (int)$_SESSION['id'] : -1 ?>;
username = get_user_name(users, userid);
if (userid > 0) $("#search-input").prop("placeholder", username);
});