From c1611d14ff01eb3148b25883f9ac104cf42cc965 Mon Sep 17 00:00:00 2001 From: Axel Stohn Date: Sat, 22 Oct 2022 14:49:02 -0700 Subject: [PATCH] adding error message for no member viewing --- Controller/GrouperGroupsController.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index a30fac3..ee63070 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -157,9 +157,16 @@ public function groupSubscribers() $this->Flash->set(_txt('pl.grouperlite.message.flash.group-detail-members-failed'), array('key' => 'error')); } + if(count($subscribers) < 1){ + $this->response->type('json'); + $this->response->statusCode(403); + //$this->response->body(json_encode(array('status' => 'ERROR', 'message' => 'NO ACCESS'))); + $this->response->send(); + $subscribers = ''; + } + $this->set(compact('subscribers')); + $this->set('_serialize', 'subscribers'); - $this->set(compact('subscribers')); - $this->set('_serialize', 'subscribers'); } /**