Fix Redis session mismatch in AuthMiddleware and ensure instant Onboarding UI transition
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user