Update login.php

This commit is contained in:
jakani24
2024-04-26 14:48:43 +02:00
parent ba08995d18
commit 937a606b3a

View File

@@ -329,13 +329,14 @@ try {
$stmt->bind_param("s", $userId); $stmt->bind_param("s", $userId);
$stmt->execute(); $stmt->execute();
$registration = $stmt->get_result(); $registration = $stmt->get_result();
$row = $registration->fetch_assoc();
if (!$registration) { if (!$registration) {
throw new Exception('Public Key for user ID not found!'); 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 ($requireResidentKey) {
if (!isset($_SESSION['registrations']) || !is_array($_SESSION['registrations']) || count($_SESSION['registrations']) === 0) { if (!isset($_SESSION['registrations']) || !is_array($_SESSION['registrations']) || count($_SESSION['registrations']) === 0) {