Update Saqel Platform: 2026-09-08 17:51:07

This commit is contained in:
Hamza-Ayed
2026-09-08 17:51:07 +03:00
parent 902cf00152
commit 75451ebc3f
12 changed files with 84 additions and 39 deletions
+7 -2
View File
@@ -571,6 +571,7 @@ class AuthController
$identityId = (int)(is_array($decoded) ? ($decoded['identity_id'] ?? 0) : ($decoded->identity_id ?? 0));
$phone = is_array($decoded) ? ($decoded['phone'] ?? '') : ($decoded->phone ?? '');
$deviceFingerprint = trim((string)$request->getHeader('x-device-fingerprint', '')) ?: 'browser_default';
// Check if student exists with this National ID
$nationalIdHash = Security::blindIndex($nationalId);
@@ -591,7 +592,7 @@ class AuthController
(int)$student['id'],
$student['uuid'],
'student',
'browser_default',
$deviceFingerprint,
$phone,
$student['full_name'],
$response,
@@ -661,6 +662,10 @@ class AuthController
$gradeLevel = trim((string)($body['grade_level'] ?? 'grade_10'));
$stream = trim((string)($body['stream'] ?? 'scientific'));
$nationalId = trim((string)($body['national_id'] ?? ''));
$deviceFingerprint = trim((string)($request->getHeader('x-device-fingerprint', '')));
if ($deviceFingerprint === '') {
$deviceFingerprint = 'browser_default';
}
if (empty($fullName) || empty($nationalId)) {
$response->status(400)->json(['status' => 'error', 'message' => 'الاسم الكامل والرقم الوطني مطلوبان']);
@@ -701,7 +706,7 @@ class AuthController
}
$this->generateSessionAndRespond(
$sId, $sUuid, 'student', 'browser_default', $phone, $fullName, $response, 'تم استكمال التسجيل بنجاح',
$sId, $sUuid, 'student', $deviceFingerprint, $phone, $fullName, $response, 'تم استكمال التسجيل بنجاح',
$identityId,
(int)(is_array($decoded) ? ($decoded['token_version'] ?? 1) : ($decoded->token_version ?? 1)),
null,