diff --git a/app/src/Controller/EmailAddressesController.php b/app/src/Controller/EmailAddressesController.php index 4b1e4c0f2..2f3655588 100644 --- a/app/src/Controller/EmailAddressesController.php +++ b/app/src/Controller/EmailAddressesController.php @@ -55,6 +55,8 @@ public function forceVerify(string $id) { $this->Flash->error($e->getMessage()); } - return $this->generateRedirect(null); + // return the email entity back to the view + $obj = $this->EmailAddresses->get((int)$id); + return $this->generateRedirect($obj); } } \ No newline at end of file diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 1528e9ee0..b1cf5b6e7 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -560,7 +560,7 @@ public function generateRedirect($entity) { return $this->redirect(['action' => 'deleted']); } elseif($redirectGoal == 'self' && $entity - && in_array($this->request->getParam('action'), ['add', 'copy', 'edit', 'unfreeze'])) { + && in_array($this->request->getParam('action'), ['add', 'copy', 'edit', 'unfreeze', 'forceVerify'])) { // We typically want to redirect to the edit view of the record, // but in some cases (eg: if the record was just frozen) we want to // redirect to "view" instead.