diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index c889e60..e2f9eea 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -65,8 +65,13 @@ public function beforeFilter() { parent::beforeFilter(); - if($this->Session->read('Auth.User.username') !== null || $this->Session->read('Auth.User.username') == ''){ - $this->Auth->unauthorizedRedirect = "/"; + // 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("/"); } $this->Security->unlockedActions = array('removeSubscriber', 'addSubscriber');