Skip to content

Commit

Permalink
VSF2-54 - adds doc block for user variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MacBalc committed Jun 16, 2023
1 parent d64d049 commit 0188289
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Resolver/Query/PasswordResetTokenResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

declare(strict_types=1);


namespace BitBag\SyliusVueStorefront2Plugin\Resolver\Query;

use ApiPlatform\GraphQl\Resolver\QueryItemResolverInterface;
Expand All @@ -25,10 +24,10 @@ public function __construct(UserRepositoryInterface $userRepository)
$this->userRepository = $userRepository;
}


public function __invoke($item, array $context): ?ShopUserInterface
{
$token = $context['args']['passwordResetToken'];
/** @var ?ShopUserInterface $user */
$user = $this->userRepository->findOneBy(['passwordResetToken' => $token]);

if (null !== $user) {
Expand Down

0 comments on commit 0188289

Please sign in to comment.