Skip to content

Commit

Permalink
fix: php 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Nov 12, 2023
1 parent b29bc4b commit c9187e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
(new Extend\ApiSerializer(CurrentUserSerializer::class))
->attributes(function (CurrentUserSerializer $serializer, User $user, array $attributes) {
$session = $serializer->getRequest()->getAttribute('session');
$attributes['loginProvider'] = $session?->get(AbstractOAuthController::SESSION_OAUTH2PROVIDER);

if ($session) {
$attributes['loginProvider'] = $session->get(AbstractOAuthController::SESSION_OAUTH2PROVIDER);
}

return $attributes;
}),
Expand Down

0 comments on commit c9187e6

Please sign in to comment.