/** * @param $id */ public function actionEdit($id = null) { if ($id === null) { $id = $this->getUser()->getId(); } if (!$this->getUser()->isAllowed('Admin:User', 'editAnother')) { if (!($this->user = $this->userFacade->getOne($id))) { $this->flashMessage('User does not exist or you dont have permission'); $this->redirect('Dashboard:'); } } $this->user = $this->userFacade->getOne($id); $this->template->user = $this->user; }
/** * @return \Flame\CMS\UserBundle\Model\User */ public function getModel() { return $this->userFacade->getOne($this->getId()); }