Update: 2026-06-27 04:58:21
This commit is contained in:
@@ -4,9 +4,9 @@ require_once __DIR__ . '/../../connect.php';
|
||||
|
||||
try {
|
||||
/* ────────────────────────────────
|
||||
1) استخدام ID من التوكن (JWT)
|
||||
1) استخدام ID: من الطلب أولاً، ثم من JWT
|
||||
───────────────────────────────── */
|
||||
$driverID = $user_id;
|
||||
$driverID = filterRequest('driver_id') ?: $user_id;
|
||||
|
||||
error_log("[Debug] DriverID from JWT: $driverID");
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ $decoded = $jwtService->authenticate();
|
||||
$user_id = $decoded->user_id ?? null;
|
||||
$role = $decoded->role ?? 'passenger';
|
||||
|
||||
|
||||
// 3. Database Connection
|
||||
try {
|
||||
$con = Database::get('main');
|
||||
|
||||
Reference in New Issue
Block a user