diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 8b9d9db..d3bbdbc 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -56,16 +56,6 @@ public function beforeFilter() { parent::beforeFilter(); - // Perform a bit of a sanity check before we get any further -// try { -// $this->verifyRequestedId(); -// } -// catch(InvalidArgumentException $e) { -// $this->Flash->set('You are currently not logged into COmanage, please log in.', array('key' => 'error')); -// $this->redirect("/"); -// } - // var_dump($this->Session); - $this->Security->unlockedActions = array( 'removeSubscriber', 'addSubscriber', @@ -820,80 +810,6 @@ function isAuthorized() return ($p[$this->action]); } - public function emaillistsMember() - { - $this->set('title', _txt('pl.grouperlite.title.emaillists-member')); - - //Set initial settings for pagination - $scope = [ - 'userId' => $this->userId, - 'page' => ($this->passedArgs['page'] ?? $this->paginate['page']), - 'limit' => ($this->passedArgs['limit'] ?? $this->paginate['limit']), - ]; - - if (isset($this->request->data['search'])) { - $searchCriteria = urldecode($this->request->data['search']); - $this->set('searchcriteria', $searchCriteria); - - try { - //Add setting for Group Membership - $scope['method'] = 'getSearchedGroups'; - $scope['searchcriteria'] = $searchCriteria; - $scope['searchpage'] = 'filteredMemberOfEmails'; - $scope['emailonly'] = true; - - $data = $this->Paginator->paginate('GrouperGroup', $scope); - - $this->set('emailgroups', $data); - - } catch (Exception $e) { - CakeLog::write('error', __METHOD__ . ' Search: ' . var_export($e->getMessage(), true)); - - $this->Flash->set("Your Email Group cannot be found, please try again later.", array('key' => 'error')); - $this->set('emailgroups', array()); - return; - } - } else { - try { - //Add setting for Group Membership - $scope['method'] = 'filteredMemberOfEmails'; - $scope['emailonly'] = true; - - $data = $this->Paginator->paginate('GrouperGroup', $scope); - - $this->set('emailgroups', $data); - - } catch (Exception $e) { - CakeLog::write('error', __METHOD__ . ' Search: ' . var_export($e->getMessage(), true)); - - $this->Flash->set("Your Email Group cannot be found, please try again later.", array('key' => 'error')); - $this->set('emailgroups', array()); - return; - } - } - - $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); - $this->set('isTemplateUser', $this->GrouperGroup->isTemplateUser($this->userId)); - $this->set('isGrouperVisible', $this->GrouperGroup->isGrouperVisible($this->userId)); - } - - public function emaillistsManage() - { - $this->set('title', _txt('pl.grouperlite.title.emaillists-manage')); - // mock data - $this->set('group', array( - 'member' => true, - 'name' => 'Email List 1', - 'domain' => 'internet2', - 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'enabled' => 'T' - )); - - $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); - $this->set('isTemplateUser', $this->GrouperGroup->isTemplateUser($this->userId)); - $this->set('isGrouperVisible', $this->GrouperGroup->isGrouperVisible($this->userId)); - } - private function getPersonIdFromUsername($username) { $args = array();