diff --git a/Clockwork/DataSource/LaravelDataSource.php b/Clockwork/DataSource/LaravelDataSource.php index 736982ed..5d550a90 100644 --- a/Clockwork/DataSource/LaravelDataSource.php +++ b/Clockwork/DataSource/LaravelDataSource.php @@ -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;