diff --git a/Model/GrouperGroup.php b/Model/GrouperGroup.php index 2f01574..a69451a 100644 --- a/Model/GrouperGroup.php +++ b/Model/GrouperGroup.php @@ -199,11 +199,12 @@ public function getSearchedGroups($userId, $searchCriteria, $page) { $returnResults = array(); - - //Now we can do a search on the fields - //will search on friendly name, group, stem, - - + foreach($pageResults as $result) { + $match = preg_grep("/$searchCriteria/i", $result); + if (!empty($match)) { + $returnResults[] = $result; + } + } return $returnResults; } diff --git a/View/Elements/Components/search.ctp b/View/Elements/Components/search.ctp index f22b80b..19f5d71 100644 --- a/View/Elements/Components/search.ctp +++ b/View/Elements/Components/search.ctp @@ -22,7 +22,8 @@ $(function() {