From d2bbb69a3ab0ec4c581b74996871683f5efb7292 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 14 May 2015 22:37:00 +0930 Subject: [PATCH] Fix user searching --- .../core/src/Core/Search/Users/UserSearcher.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Core/Search/Users/UserSearcher.php b/framework/core/src/Core/Search/Users/UserSearcher.php index 3265219d6..f5d282757 100644 --- a/framework/core/src/Core/Search/Users/UserSearcher.php +++ b/framework/core/src/Core/Search/Users/UserSearcher.php @@ -10,6 +10,8 @@ class UserSearcher implements SearcherInterface { protected $query; + protected $activeGambits = []; + protected $gambits; protected $users; @@ -32,6 +34,16 @@ class UserSearcher implements SearcherInterface return $this->query->getQuery(); } + public function addActiveGambit($gambit) + { + $this->activeGambits[] = $gambit; + } + + public function getActiveGambits() + { + return $this->activeGambits; + } + public function search(UserSearchCriteria $criteria, $limit = null, $offset = 0, $load = []) { $this->user = $criteria->user; @@ -64,7 +76,7 @@ class UserSearcher implements SearcherInterface $users = $this->query->get(); - if ($count > 0 && $areMoreResults = $users->count() > $count) { + if ($limit > 0 && $areMoreResults = $users->count() > $limit) { $users->pop(); }