This commit is contained in:
Hamza-Ayed
2026-04-30 16:17:26 +03:00
parent d31d99e132
commit 7bf5200cd3
3 changed files with 21 additions and 16 deletions

View File

@@ -14,9 +14,10 @@ try {
$con = Database::get('main');
// البحث بالبصمة للموظف
$sql = "SELECT * FROM `users` WHERE `fingerprint` = :fp AND `user_type` = 'service' LIMIT 1";
$fpHash = hash('sha256', $fingerprint);
$sql = "SELECT * FROM `users` WHERE `fingerprint_hash` = :fp AND `user_type` = 'service' LIMIT 1";
$stmt = $con->prepare($sql);
$stmt->execute([':fp' => $fingerprint]);
$stmt->execute([':fp' => $fpHash]);
$user = $stmt->fetch(PDO::FETCH_ASSOC);
if ($user) {