Skip to content

Commit

Permalink
Fix resolving of users
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Aug 15, 2023
1 parent 10163ba commit 21af4c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Pulse.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ public function resolveUsers(Collection $ids): Collection
}

if (class_exists(\App\Models\User::class)) {
return \App\Models\User::whereKey($ids)->get(['name', 'email']);
return \App\Models\User::whereKey($ids)->get(['id', 'name', 'email']);
}

if (class_exists(\App\User::class)) {
return \App\User::whereKey($ids)->get(['name', 'email']);
return \App\User::whereKey($ids)->get(['id', 'name', 'email']);
}

return $ids->map(fn ($id) => ['name' => "User ID: {$id}"]);
return $ids->map(fn ($id) => ['id' => $id, 'name' => "User ID: {$id}"]);
}

/**
Expand Down

0 comments on commit 21af4c8

Please sign in to comment.