Archived
1
0
Fork 0

app/controllers/backend/UserController.php: in statusAction() display "Activated" in flash message when status is changed to "Active"

This commit is contained in:
Henrik Hautakoski 2022-07-24 17:26:45 +02:00
parent 652b814e13
commit b2249735c3

View file

@ -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');
}
}