Update: 2026-06-24 23:51:26

This commit is contained in:
Hamza-Ayed
2026-06-24 23:51:26 +03:00
parent c9d07f91fe
commit aba42f0a7f

View File

@@ -0,0 +1,37 @@
<?php
require_once __DIR__ . '/core/bootstrap.php';
$phone = '962798583052';
$encPhone = $encryptionHelper->encryptData($phone);
echo "Plain phone: " . $phone . "\n";
echo "Encrypted phone: " . $encPhone . "\n";
try {
$con = Database::get('main');
// Check passengers table
$stmt = $con->prepare("SELECT id, phone, email, first_name FROM passengers WHERE id = 'e494c5750f95e1c26654'");
$stmt->execute();
$p = $stmt->fetch(PDO::FETCH_ASSOC);
echo "Passenger row: " . json_encode($p) . "\n";
if ($p) {
echo "Decrypted Phone: " . $encryptionHelper->decryptData($p['phone']) . "\n";
}
// Check phone_verification_passenger
$stmt2 = $con->prepare("SELECT * FROM phone_verification_passenger WHERE phone_number = ?");
$stmt2->execute([$encPhone]);
$v = $stmt2->fetchAll(PDO::FETCH_ASSOC);
echo "Verification rows for direct match: " . json_encode($v) . "\n";
// Let's get all rows in phone_verification_passenger to see what we have
$stmt3 = $con->prepare("SELECT * FROM phone_verification_passenger ORDER BY id DESC LIMIT 5");
$stmt3->execute();
$allV = $stmt3->fetchAll(PDO::FETCH_ASSOC);
foreach ($allV as $row) {
echo "Row ID: " . $row['id'] . " | Phone: " . $row['phone_number'] . " | Decrypted: " . $encryptionHelper->decryptData($row['phone_number']) . " | Verified: " . $row['verified'] . "\n";
}
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}