/** * Activate the author - activate the author: switch disable -> 0 * * @param string $author */ public function activateAction($author) { /** @var \Vendor\Guestbook\Domain\Model\Author $author */ $author = $this->authorRepository->findByUid((int) $author); if ($author->getDisable() == 0) { $this->redirect('list', 'Comment', NULL, NULL); } $author->setDisable(0); $this->authorRepository->update($author); $this->view->assign('author', $author); }