Skip to content

Commit

Permalink
Use (potentially overloaded) key() method for finding user (#267)
Browse files Browse the repository at this point in the history
* Use (potentially overloaded) key() method for finding user

* don't use strict compare for user identifier
  • Loading branch information
hulkur authored Jan 6, 2024
1 parent 32fb030 commit a9c76cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function load(Collection $keys): self
*/
public function find(int|string|null $key): object
{
$user = $this->resolvedUsers->first(fn ($user) => $user->getAuthIdentifier() == $key);
$user = $this->resolvedUsers->first(fn ($user) => $this->key($user) == $key);

if ($this->fieldResolver !== null && $user !== null) {
return (object) ($this->fieldResolver)($user);
Expand Down

0 comments on commit a9c76cf

Please sign in to comment.