Initial commit with updated Auth and media ignored
This commit is contained in:
26
auth/syria/driver/isPhoneVerified.php
Executable file
26
auth/syria/driver/isPhoneVerified.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../../../connect.php';
|
||||
|
||||
$phoneNumber = filterRequest("phone_number");
|
||||
|
||||
// تشفير الرقم قبل البحث
|
||||
$phoneNumber_encrypted = $encryptionHelper->encryptData($phoneNumber);
|
||||
|
||||
try {
|
||||
// الاستعلام عن السائق حسب رقم الهاتف وحالة التحقق
|
||||
$stmt = $con->prepare("
|
||||
SELECT * FROM phone_verification
|
||||
WHERE phone_number = ? AND is_verified = 1
|
||||
");
|
||||
$stmt->execute([$phoneNumber_encrypted]);
|
||||
$driver = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($driver) {
|
||||
jsonSuccess(null, "Phone number is verified.");
|
||||
} else {
|
||||
jsonError("Phone number is not verified or does not exist.");
|
||||
}
|
||||
|
||||
} catch (PDOException $e) {
|
||||
jsonError("Database error: " . $e->getMessage());
|
||||
}
|
||||
Reference in New Issue
Block a user