From 1d58ba5b4dbd7da68f29758698e4552bad9b13f6 Mon Sep 17 00:00:00 2001 From: Axel Stohn Date: Wed, 6 Jul 2022 15:00:33 -0700 Subject: [PATCH] search only returns active users --- Controller/GrouperGroupsController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 0c3ea45..5295a67 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -247,7 +247,12 @@ public function findSubscriber() foreach(array('Name', 'EmailAddress', 'Identifier') as $m) { $hits = $this->CoPerson->$m->search($co, $findUserId, 25); - $coPersonIds = array_merge($coPersonIds, Hash::extract($hits, '{n}.CoPerson.id')); + foreach($hits as $hit) { + if ($hit['CoPerson']['status'] == 'A') { + $coPersonIds[] = $hit['CoPerson']['id']; + } + } + // $coPersonIds = array_merge($coPersonIds, Hash::extract($hits, '{n}.CoPerson.id')); } }