From 5647aa5a87a1c6f4d179b6afc524308aed192fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Tue, 6 Feb 2024 10:56:38 +0100 Subject: [PATCH] fix(login): user get null check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- lib/Controller/LoginController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/LoginController.php b/lib/Controller/LoginController.php index 8e84c3fd..aca8cec2 100644 --- a/lib/Controller/LoginController.php +++ b/lib/Controller/LoginController.php @@ -503,7 +503,7 @@ public function code(string $state = '', string $code = '', string $scope = '', $this->ldapService->syncUser($userId); // when auto provision is disabled, we assume the user has been created by another user backend (or manually) $user = $this->userManager->get($userId); - if ($this->ldapService->isLdapDeletedUser($user)) { + if ($user !== null && $this->ldapService->isLdapDeletedUser($user)) { $user = null; } }