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 29e107c
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 (preg_match('/^no primary id/', $data->primary_id)) {
continue;
}
$user = User::fromResponse($this->client, $data);
if ($full) {
$user->fetch();
Expand Down

0 comments on commit 29e107c

Please sign in to comment.