Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if the model correctly implements the trait. #94

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

MathieuMaas
Copy link
Contributor

@MathieuMaas MathieuMaas commented Dec 11, 2023

In my auth.php I got multiple guards example:

    'guards' => [
        'web' => [
            'driver'   => 'session',
            'provider' => 'users',
        ],

        'member' => [
            'driver'   => 'session',
            'provider' => 'members',
.....

For now I only want to log the users data so I applied the trait to the User::class. Now when logging in as member. I get the following error: call to undefined method App\Models\Member::authentications(). This is because my Member::class does not have the trait implemented. There is no way to configure this either. So I added this check. I could add it do all the listeners or do you rather have a config with the classes into it that should be logged?

@dimitri-koenig
Copy link

@rappasoft Could you please review this PR and possibly merge it and make a new release quickly? That would be really helpful since not checking this makes it really cumberstone to use it with some other 3rd party packages which use their own user model and fire login events. Thx a lot :-)

@rappasoft rappasoft changed the base branch from main to develop March 29, 2024 00:48
@rappasoft rappasoft merged commit c901975 into rappasoft:develop Mar 29, 2024
4 checks passed
@rappasoft rappasoft mentioned this pull request Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants