From 9d22d1313eb3c8e60a1bfd6b0b1469f74673eff1 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 24 Mar 2026 20:30:17 +0530 Subject: [PATCH] phpstan again --- app/controllers/general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 6f41d4b4f9..9958c2494e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -383,12 +383,12 @@ function router(Http $utopia, Database $dbForPlatform, callable $getProjectDB, S // isExecutionAllowed remains false } - /** @var \Appwrite\Utopia\Database\Documents\User | null */ $associatedUser = null; - $userExists = false; + $userId = $payload['userId'] ?? ''; if (!empty($userId)) { + /** @var \Appwrite\Utopia\Database\Documents\User $associatedUser */ $associatedUser = $authorization->skip(fn () => $dbForProject->getDocument('users', $userId)); if (!$associatedUser->isEmpty() && $associatedUser->getAttribute('status', false)) { $userExists = true;