Skip to content

Commit

Permalink
[#6] Ignore users without primary id
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed Jun 18, 2018
1 parent 5d827e5 commit 491ce2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Users/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function search($query, $full = false, $batchSize = 10)
}

foreach ($response->user as $data) {
if (strpos($data->primary_id, 'no primary id') === 0) {
continue;
}
$user = User::fromResponse($this->client, $data);
if ($full) {
$user->fetch();
Expand Down

0 comments on commit 491ce2a

Please sign in to comment.