/** * The subscribe view and processor */ public function unsubscribeAction() { $identity = $this->authenticate(); $userId = $identity['id']; $feedId = $this->getRequest()->getParam('feedId'); // delete if possible $deleted = $feedId ? $this->portal->delete("user_id = {$userId} and feed_id = {$feedId}") : 0; $this->view->status = $deleted; }