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

Missing argument 1 for Corcel\Providers\AuthUserProvider #190

Closed
johnhalsey opened this issue Aug 3, 2016 · 5 comments
Closed

Missing argument 1 for Corcel\Providers\AuthUserProvider #190

johnhalsey opened this issue Aug 3, 2016 · 5 comments

Comments

@johnhalsey
Copy link

I have installed this package into Laravel, and tried to implement the authentication so that a user can login via the wordpress credentials.

However in the AuthServiceProvider class, the construct() takes a $config variable, but it's not mentioned in the ReadMe under Authentication, and I'm not sure what is supposed to be passed in.

Can you help?

@rundef
Copy link
Member

rundef commented Aug 3, 2016

Hi,

If you are using Laravel, you don't need to instantiate the AuthUserProvider class. Just define the Authentication provider and the User provider like it's done in the documentation ; Then, Laravel's built-in authentication system will be using thoses providers to authenticate users in your app.

But if you do have to instantiate AuthUserProvider for some reason, you can just pass null.

@johnhalsey
Copy link
Author

Ah I see where I went wrong there.

But after amending the config/app.php and config/auth.php files as advised, when attempting to login, my laravel app is still looking for my laravel users table, instead of the wordpress users.

I thought I might need to create a User model that has a protected $connection pointing to the wordpress data, but still no joy.

@QWp6t
Copy link

QWp6t commented Aug 4, 2016

Pretty sure your issue was fixed here: #182

You using the latest version?

@johnhalsey
Copy link
Author

Yes, I have the latest version.

@johnhalsey
Copy link
Author

OK, I figured it out. I had to change the default connection in Laravel to the wordpress connection. Then it worked.

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

No branches or pull requests

3 participants