From f0ede8a3119b84d56c9410689c480a92bbd7345f Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Tue, 23 Jun 2020 18:15:47 +0300 Subject: [PATCH] online fix --- enter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enter.php b/enter.php index 2d340dc..55064ba 100644 --- a/enter.php +++ b/enter.php @@ -33,7 +33,7 @@ if ($username && $password) { $_SESSION['sid'] = session_id(); $onl = db::c()->query('SELECT user_id FROM online WHERE user_id = "?s"', $data['id'])->fetch_assoc(); - if (isset($onl['id'])) { + if (isset($onl['user_id'])) { db::c()->query('UPDATE online SET date = ?i WHERE user_id = "?s"', time(), $data['id']); } else { db::c()->query('INSERT INTO online (user_id, date, room) VALUES (?i, ?i, ?i)', $data['id'], time(), $data['room']);