From 937a606b3a5ff6a5d59305263b8c29a2f5cbda46 Mon Sep 17 00:00:00 2001 From: jakani24 Date: Fri, 26 Apr 2024 14:48:43 +0200 Subject: [PATCH] Update login.php --- src/server/cyberhex-code/test/login.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/cyberhex-code/test/login.php b/src/server/cyberhex-code/test/login.php index c5e9489..858b2f9 100644 --- a/src/server/cyberhex-code/test/login.php +++ b/src/server/cyberhex-code/test/login.php @@ -329,13 +329,14 @@ try { $stmt->bind_param("s", $userId); $stmt->execute(); $registration = $stmt->get_result(); + $row = $registration->fetch_assoc(); if (!$registration) { throw new Exception('Public Key for user ID not found!'); } - $_SESSION["registrations"]->credentialId=$registration["credential_id"]; + $_SESSION["registrations"]->credentialId=$row["credential_id"]; if ($requireResidentKey) { if (!isset($_SESSION['registrations']) || !is_array($_SESSION['registrations']) || count($_SESSION['registrations']) === 0) {