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

[5.x] Cache User instance to allow $provider->user() to be called multiple times #498

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

rihardsgrislis
Copy link
Contributor

@rihardsgrislis rihardsgrislis commented Nov 21, 2020

This allows $provider->user() to be called multiple times. Handy if you want to call it in a form request to do some validation before accessing it in the controller. More info: #490.

… to call it in a form request to do some validation before accessing it in the controller. More info: laravel#490.
@rihardsgrislis
Copy link
Contributor Author

@driesvints is it fine that I included the checks for this in the existing tests? 🤔

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

@taylorotwell taylorotwell reopened this Nov 23, 2020
@driesvints driesvints changed the title Cache User instance to allow $provider->user() to be called multiple times [5.x] Cache User instance to allow $provider->user() to be called multiple times Nov 23, 2020
@taylorotwell taylorotwell merged commit 4f960e1 into laravel:5.x Nov 23, 2020
@driesvints
Copy link
Member

@rihardssceredins yeah it's fine. Thanks for the pr.

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