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

[7.0] Change wasRecentlyCreated to false #979

Merged
merged 1 commit into from
Mar 1, 2019
Merged

[7.0] Change wasRecentlyCreated to false #979

merged 1 commit into from
Mar 1, 2019

Conversation

FatBoyXPC
Copy link
Contributor

Resubmitting with explanation as requested by @driesvints in #975

The core framework fixed this same bug with the core actingAs method but
it seems it was missed for Passport! Check this PR for more details:
laravel/framework#25873

I don't think we need the conditional, and certainly not the truthy check of it on the right side. Setting something to false that's already false won't have any negative effects. The User that's passed to the auth guard is expecting an Authenticatable which also extends Model, which should always have wasRecentlyCreated.

I look at this as "Hey look we need this to be false, why do we care if it's true first?"

@driesvints driesvints changed the title Change wasRecentlyCreated to false [7.0] Change wasRecentlyCreated to false Feb 28, 2019
@taylorotwell
Copy link
Member

Please include the exact conditional check that is in the framework.

The core framework fixed this same bug with the core actingAs method but
it seems it was missed for Passport! Check this PR for more details:
laravel/framework#25873
@FatBoyXPC
Copy link
Contributor Author

@taylorotwell Done! Did I miss something about how this conditional works or is this a consistency thing?

@taylorotwell taylorotwell merged commit 4a19577 into laravel:7.0 Mar 1, 2019
@FatBoyXPC FatBoyXPC deleted the fix-actingas branch March 1, 2019 15:12
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.

2 participants