Update: 2026-07-26 01:03:40

This commit is contained in:
Hamza-Ayed
2026-07-26 01:03:41 +03:00
parent 76c8652bf0
commit 1dfc302a4f
5 changed files with 357 additions and 129 deletions
@@ -44,7 +44,10 @@ try {
// Auto-seed/create tester driver logic removed for security
// SQL لاسترجاع المستخدم بناءً على البريد الإلكتروني المشفر
global $blindIndex;
$emailBidx = $blindIndex ? $blindIndex->index('driver.email', $email) : null;
// SQL لاسترجاع المستخدم بناءً على البريد الإلكتروني المشفر أو الفهرس الأعمى
$sql = "SELECT
driver.*,
phone_verification.is_verified,
@@ -55,12 +58,11 @@ try {
LEFT JOIN phone_verification ON phone_verification.phone_number = driver.phone_key
LEFT JOIN CarRegistration ON CarRegistration.driverID = driver.id
WHERE
driver.email = :email
driver.email = :email OR (:email_bidx IS NOT NULL AND driver.email_bidx = :email_bidx)
LIMIT 1";
$stmt = $con->prepare($sql);
$stmt->bindParam(':email', $encryptedEmail);
$stmt->execute();
$stmt->execute([':email' => $encryptedEmail, ':email_bidx' => $emailBidx]);
$data = $stmt->fetch(PDO::FETCH_ASSOC);