From 34e01d02d73662794ee1564937e99ad44a209b7c Mon Sep 17 00:00:00 2001 From: Axel Stohn Date: Fri, 24 Mar 2023 11:35:25 -0700 Subject: [PATCH] Adding code to use incoming links to for joining groups --- Controller/GrouperGroupsController.php | 52 +++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 7859c04..1997b55 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -552,8 +552,13 @@ public function groupOptin() 'limit' => ($this->passedArgs['limit'] ?? $this->paginate['limit']), ]; - if (isset($this->request->data['search'])) { - $searchCriteria = urldecode($this->request->data['search']); + if (isset($this->request->data['search']) || isset($this->request->query['search'])) { + if(isset($this->request->data['search'])){ + $searchCriteria = urldecode($this->request->data['search']); + } else { + $searchCriteria = urldecode($this->request->query['search']); + } + $this->set('searchcriteria', $searchCriteria); try { @@ -777,6 +782,7 @@ function isAuthorized() // specific to the needs of I2. // BEGIN =============================================== +<<<<<<< Updated upstream /*$uid=$this->Session->read('Auth.User.co_person_id'); $username=$this->Session->read('Auth.User.username'); error_log("HUBING ================ " . $username); @@ -818,6 +824,48 @@ function isAuthorized() } // END =============================================== */ +======= +// $uid=$this->Session->read('Auth.User.co_person_id'); +// $username=$this->Session->read('Auth.User.username'); +// error_log("HUBING ================ " . $username); +// +// switch ($username) { +// case "chubing@internet2.edu": +// error_log("username is " . $username); +// $uid=32; +// break; +// case "pcaskey@internet2.edu": +// error_log("username is " . $username); +// $uid=28; +// break; +// case "ij@internet2.edu": +// error_log("username is " . $username); +// $uid=6842; +// break; +// case "aaschenbrener@internet2.edu": +// error_log("username is " . $username); +// $uid=13643; +// // 12430 in dev +// break; +// case "sho@internet2.edu": +// error_log("username is " . $username); +// $uid=6103; +// break; +// case "wkaufman@internet2.edu": +// error_log("username is " . $username); +// $uid=6830; +// break; +// } +// error_log("UID IS ================ " . $uid); +// +// if ($this->Session->check('Plugin.Grouper.UserId')) { +// $this->userId = $this->Session->read('Plugin.Grouper.UserId'); +// } else { +// $this->userId = $this->getUserId($uid); +// $this->Session->write('Plugin.Grouper.UserId', $this->userId); +// } + // END =============================================== +>>>>>>> Stashed changes // Determine what operations this user can perform // Construct the permission set for this user, which will also be passed to the view.