Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Avoid calling Auth multiple times. #237

Closed
wants to merge 1 commit into from
Closed

Avoid calling Auth multiple times. #237

wants to merge 1 commit into from

Conversation

AbbyJanke
Copy link
Contributor

Instead of recalling the Auth::user() instance use the $user variable which already calls the Auth method within the controller.

This is a fix/minor change for my original PR #229

Instead of recalling the `Auth::user()` instance use the `$user` variable which already calls the Auth method within the controller.
@tabacitu
Copy link
Member

tabacitu commented Mar 6, 2018

Thank you @AbbyJanke ! Valid point.

I'm going to close this in favour of #165 - which brings the option of using a custom guard across Backpack. In order to pull in the correct info, the guard needs to always be used. So that PR replaces your $user calls with backpack_auth(), which uses the correct guard.

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants