From 2062caf99834dd3053cc5281eaa920f7a73b6c6d Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 15 Jun 2026 11:52:47 -0400 Subject: [PATCH] Redirect forceVerify email address action back to edit/view (CFM-14) --- app/src/Controller/EmailAddressesController.php | 4 +++- app/src/Controller/StandardController.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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.