From b2249735c3baa3da88f62ffa02e41eda2bcb4edb Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 24 Jul 2022 17:26:45 +0200 Subject: [PATCH] app/controllers/backend/UserController.php: in statusAction() display "Activated" in flash message when status is changed to "Active" --- app/controllers/backend/UserController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/backend/UserController.php b/app/controllers/backend/UserController.php index 4ebde4f..20f819c 100644 --- a/app/controllers/backend/UserController.php +++ b/app/controllers/backend/UserController.php @@ -57,7 +57,13 @@ class UserController extends \Phalcon\Mvc\Controller $user->setStatus(ucfirst($type)); $user->save(); - $this->flash->success('The account was: ' . $user->getStatus()); + $status = $user->getStatus(); + // Bit of a hack to convert "active" to verb. + if ($status === User::STATUS_ACTIVE) { + $status = 'Activated'; + } + + $this->flash->success('The account was: ' . $status); $this->response->redirect('/admin'); } }