From 16984214452971bb0ec830716af42976ef3b550f Mon Sep 17 00:00:00 2001 From: Aselsan Date: Mon, 9 Sep 2024 13:24:09 +0700 Subject: [PATCH] fix: ensure ban check for existing users --- src/Controllers/OAuthController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/OAuthController.php b/src/Controllers/OAuthController.php index 94d454f..1c81fbf 100644 --- a/src/Controllers/OAuthController.php +++ b/src/Controllers/OAuthController.php @@ -111,7 +111,7 @@ public function callBack(): RedirectResponse $users->addToDefaultGroup($user); } - if ($this->userExist->isBanned()) { + if ($this->userExist && $this->userExist->isBanned()) { return redirect()->to(config('Auth')->logoutRedirect())->with('error', $this->userExist->getBanMessage() ?? lang('Auth.bannedUser')); }