Update: 2026-07-31 19:21:38
This commit is contained in:
@@ -52,12 +52,19 @@ try {
|
|||||||
FROM driver
|
FROM driver
|
||||||
LEFT JOIN phone_verification ON phone_verification.phone_number = driver.phone_key
|
LEFT JOIN phone_verification ON phone_verification.phone_number = driver.phone_key
|
||||||
LEFT JOIN CarRegistration ON CarRegistration.driverID = driver.id
|
LEFT JOIN CarRegistration ON CarRegistration.driverID = driver.id
|
||||||
WHERE
|
WHERE driver.email = :email";
|
||||||
driver.email = :email OR (:email_bidx IS NOT NULL AND driver.email_bidx = :email_bidx)
|
|
||||||
LIMIT 1";
|
$params = [':email' => $encryptedEmail];
|
||||||
|
|
||||||
|
if ($emailBidx !== null) {
|
||||||
|
$sql .= " OR driver.email_bidx = :email_bidx";
|
||||||
|
$params[':email_bidx'] = $emailBidx;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql .= " LIMIT 1";
|
||||||
|
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->execute([':email' => $encryptedEmail, ':email_bidx' => $emailBidx]);
|
$stmt->execute($params);
|
||||||
|
|
||||||
$data = $stmt->fetch(PDO::FETCH_ASSOC);
|
$data = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user