From 1652387e87215d6d4d6b677d982865eb27b44ba3 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 20 May 2020 22:44:41 +0200 Subject: report usernames too --- server/report/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/report') diff --git a/server/report/index.php b/server/report/index.php index 7b48b35..b9ead0b 100644 --- a/server/report/index.php +++ b/server/report/index.php @@ -37,14 +37,15 @@ app_version VARCHAR(420) , previous_commit VARCHAR(69) , ip VARCHAR(69) , + username VARCHAR(69) )"; $result = mysqli_query($conn, $query); - $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip) VALUES". - "(?, ?, ?, ?, ?, ?, ?, ?, ?)"); - $stmt->bind_param("ssiisssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"], + $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip, username) VALUES". + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + $stmt->bind_param("ssiissssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"], $_REQUEST["error"]["column"], $_REQUEST["error"]["obj"], $_REQUEST["client"]["ua"], $_REQUEST["client"]["app_version"], - $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"]); + $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"], $_REQUEST["client"]["username"]); $stmt->execute(); -- cgit v1.2.3