Skip to content

Commit

Permalink
Laravel - fix crash when resolving authenticated user.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsgoingd committed Oct 19, 2022
1 parent bdf55e4 commit 66f54d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Clockwork/DataSource/LaravelDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ protected function resolveAuthenticatedUser(Request $request)
if (! ($user = $this->app['auth']->user())) return;

// retrieve attributes in this awkward way to make sure we don't trigger exceptions with Eloquent strict mode on
$user = $user->getAttributes();
$keyName = $user->getKeyName();
$user = $user->getAttributes();

if (! isset($user['email']) || ! isset($user[$keyName])) return;

Expand Down

0 comments on commit 66f54d4

Please sign in to comment.