Skip to content

Commit 66f54d4

Browse files
committed
Laravel - fix crash when resolving authenticated user.
1 parent bdf55e4 commit 66f54d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Clockwork/DataSource/LaravelDataSource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ protected function resolveAuthenticatedUser(Request $request)
202202
if (! ($user = $this->app['auth']->user())) return;
203203

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

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

0 commit comments

Comments
 (0)