-
Notifications
You must be signed in to change notification settings - Fork 193
Login fallback when there is no connection does not work #897
Comments
fixed on #898 |
Fixed thanks to @ivanwitzke - v6.1.3 is now released with his patch 👍 |
Thanks a lot! Altough, it still needs a small fix for cases when exception is thrown. if ($user instanceof User) {
return $this->setAndImportAuthenticatingUser($user);
} It also still bugs me a lot the block below. It says if (!$provider->getConnection()->isBound()) {
// We'll make sure we have a bound connection before
// allowing dynamic calls on the default provider.
$provider->connect();
} |
That's completely my mistake, I should have triple checked the PR before merging. It's now fixed and will be released shortly.
You're missing the outer context of that snippet, as it's saying "If dynamic calls are being made to the default provider, then make sure we bind to that provider before we pass the call along if it is not already connected". I'll update the comment so it's more clear 👍 |
Description:
Login fallback when there is no connection does not work.
The problem is caused by the line
$user = Resolver::byCredentials($credentials);
insideDatabaseUserProvider::retrieveByCredentials
.It tries to connect with an unbounded connection without handling the exception thrown. Changing
if statement
like below fixes the problem.- if (!$provider->getConnection()->isBound())
+ if ($provider->getConnection()->isBound())
Can make a PR if you want.
The text was updated successfully, but these errors were encountered: