Skip to content

Commit

Permalink
fix: ensure ban check for existing users
Browse files Browse the repository at this point in the history
  • Loading branch information
warcooft authored Sep 9, 2024
1 parent de7f4c3 commit 1698421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/OAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

Expand Down

0 comments on commit 1698421

Please sign in to comment.