Skip to content

Commit 2b1672e

Browse files
authored
Merge pull request #169 from warcooft/patch-oauth
fix: ensure ban check for existing users
2 parents de7f4c3 + 1698421 commit 2b1672e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/OAuthController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function callBack(): RedirectResponse
111111
$users->addToDefaultGroup($user);
112112
}
113113

114-
if ($this->userExist->isBanned()) {
114+
if ($this->userExist && $this->userExist->isBanned()) {
115115
return redirect()->to(config('Auth')->logoutRedirect())->with('error', $this->userExist->getBanMessage() ?? lang('Auth.bannedUser'));
116116
}
117117

0 commit comments

Comments
 (0)