Fix Redis session mismatch in AuthMiddleware and ensure instant Onboarding UI transition

This commit is contained in:
Hamza-Ayed
2026-08-26 23:46:48 +03:00
parent cdb08331c0
commit fe66f05057
3 changed files with 46 additions and 21 deletions
@@ -26,7 +26,12 @@ class TeacherController
$profile = Database::selectOne("SELECT * FROM teacher_profiles WHERE user_id = ? LIMIT 1", [$userId]);
$decryptedName = Security::decrypt($user['full_name']);
$rawName = (string)($user['full_name'] ?? '');
$decryptedName = Security::decrypt($rawName) ?: $rawName;
if (empty($decryptedName)) {
$decryptedName = 'معلم جديد';
}
$isComplete = !empty($profile) && !empty($profile['specialization']) && $decryptedName !== 'معلم جديد';
$response->json([