Skip to content

Commit

Permalink
Update EngineManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Aug 6, 2020
1 parent 1d2f9b8 commit e751cf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EngineManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function defaultAlgoliaHeaders()
$headers['X-Forwarded-For'] = $ip;
}

if ($user = request()->user() && method_exists($user, 'getKey')) {
if (($user = request()->user()) && method_exists($user, 'getKey')) {
$headers['X-Algolia-UserToken'] = $user->getKey();
}

Expand Down

0 comments on commit e751cf4

Please sign in to comment.