Compare commits
2
Commits
aba42f0a7f
...
3c057dfbf8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c057dfbf8 | ||
|
|
5f431b4f19 |
@@ -8,6 +8,9 @@ $appName = filterRequest("appName") ?: 'unknown';
|
|||||||
|
|
||||||
// الاعتماد كلياً على الـ ID المستخرج من JWT داخل connect.php
|
// الاعتماد كلياً على الـ ID المستخرج من JWT داخل connect.php
|
||||||
$id = $user_id;
|
$id = $user_id;
|
||||||
|
if ($id === 'new' && isset($decoded->sub) && $decoded->sub !== 'new') {
|
||||||
|
$id = $decoded->sub;
|
||||||
|
}
|
||||||
|
|
||||||
// تجهيز الاستعلام
|
// تجهيز الاستعلام
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
<?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";
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user