-
Couldn't load subscription status.
- Fork 194
BindsLdapUserModel - Laravel 5.8 #696
Conversation
Hi @andrefigueira93, I don't think this change would resolve the issue you're having.
The Authenticated and Login events both have the $guard property set to the name of the guard that your user is authenticated with. This property allows us to locate the correct guard and ensure you're using an Adldap2 provider with it so no exceptions are generated.
Authenticated Event:
https://github.com/laravel/framework/blob/cd7486a4355be57e8928f89048a25f30883f202f/src/Illuminate/Auth/Events/Authenticated.php#L16
What is the guard property set to on the Login and Authenticated events?
Reproduction of the error
Captura de Tela 2019年03月21日 às 11 32 52
The problem is here -> dd($event)
Captura de Tela 2019年03月21日 às 11 36 36
The $event doesn't have the ->guard property.
Auth::guard()->getProvider() instanceof DatabaseUserProvider is enough to verify.
Strange, are you sure you're using Laravel 5.8?
This is definitely a bug though, I thought the $guard property was available for Laravel 5.5 or greater, but it's only available on Laravel 5.7 or greater.
Going to patch this now, thanks @andrefigueira93!
Tried in 5.6, 5.7 and 5.8 =/ all of them are reproducing this error =/
You're welcome! I'm here to help =)
Are you sure you're using those versions? I'm using v6.0 model binding in 5.7 and 5.8 and don't receive this exception.
Uh oh!
There was an error while loading. Please reload this page.
File Being Edited => Adldap\Laravel\Listeners\BindsLdapUserModel
to
Unique way that works