diff --git a/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php b/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php index 52c4ec626..cbfd00a6b 100644 --- a/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php +++ b/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php @@ -62,7 +62,10 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_bc_parent_primarykey', $this->EmailVerifiers->EnrollmentFlowSteps->getPrimaryKey()); } - if ($this->getRequest()->getQuery("op") == "verify" || $this->getRequest()->getQuery("op") == "index") { + // We use the viewvar to determine the op since 'index' isn't always present + $op = $this->viewBuilder()->getVar('vv_op'); + + if($op == "verify" || $op == "index") { // This will suppress the default behavior. By default, we print the submit button in the // unorderedList.php element. But for the verify view we want to override and customize $this->set('suppress_submit', true); @@ -80,9 +83,8 @@ public function beforeRender(\Cake\Event\EventInterface $event) { * @return void * @since COmanage Registry v5.1.0 */ - public function resend($id) - { - + + public function resend($id) { $this->viewBuilder()->setClassName('Json'); if (!$this->getRequest()->is('ajax')) { diff --git a/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php b/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php index b438d3565..2c068d4e3 100644 --- a/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php +++ b/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php @@ -57,8 +57,8 @@