protected function getItem($id = null, $option = null) { if ($option !== null) { return parent::getItem($id, $option); } if ($id === null) { $zfcUserOptions = $this->getZfcUserOptions(); $class = $zfcUserOptions->getUserEntityClass(); $user = new $class(); return $user; } $user = $this->getUserMapper()->findById($id); return $user; }
protected function getItem($id = null, $option = null) { if (!$this->zfcUserAuthentication()->hasIdentity()) { return null; } $item = parent::getItem($id, $option); if ($id !== null && $option === null && !$this->getBubblePermission()->canView($item)) { return null; } return $item; }