public function mayOperate($sOperation, $oUser = false) { if ($oUser === false) { $oUser = Session::getSession()->getUser(); } $bIsAllowed = false; if ($oUser && ($this->isNew() || $this->getCreatedBy() === $oUser->getId()) && NewsletterPeer::mayOperateOnOwn($oUser, $this, $sOperation)) { $bIsAllowed = true; } else { if (NewsletterPeer::mayOperateOn($oUser, $this, $sOperation)) { $bIsAllowed = true; } } FilterModule::getFilters()->handleNewsletterOperationCheck($sOperation, $this, $oUser, array(&$bIsAllowed)); return $bIsAllowed; }