public function preDispatch() { parent::preDispatch(); if (in_array('cc', $this->getDi()->modules->getEnabled())) { throw new Am_Exception_AccessDenied(___('Online backup is disabled if you have CC payment plugins enabled. Use offline backup instead')); } }
public function preDispatch() { parent::preDispatch(); if ($this->getDi()->auth->getUserId()) { $this->_redirect('member'); } }
function preDispatch() { $this->user_id = intval($this->_request->user_id); if ($this->_request->getActionName() != 'log') { if ($this->user_id <= 0) { throw new Am_Exception_InputError("user_id is empty in " . get_class($this)); } } return parent::preDispatch(); }
public function preDispatch() { $db_version = $this->getDi()->store->get('db_version'); if (empty($db_version)) { $this->getDi()->store->set('db_version', AM_VERSION); } elseif ($db_version != AM_VERSION) { $this->redirectLocation(REL_ROOT_URL . '/admin-upgrade-db'); } parent::preDispatch(); }
function preDispatch() { if (!$this->getModule()->getConfig('does_not_require_login')) { $this->getDi()->auth->requireLogin(ROOT_URL . '/helpdesk/faq'); } $this->view->headLink()->appendStylesheet($this->view->_scriptCss('helpdesk-user.css')); if ($this->getDi()->auth->getUser() && ($page = $this->getDi()->navigationUser->findOneBy('id', 'helpdesk-faq'))) { $page->setActive(true); } parent::preDispatch(); }
public function preDispatch() { parent::preDispatch(); $this->view->invoice = null; $this->view->id = null; $this->view->paysystems = array(); $this->invoice = $this->getDi()->invoiceTable->findBySecureId($this->getFiltered('id'), "CANCEL"); if ($this->invoice) { if ($this->invoice->isPaid()) { throw new Am_Exception_InputError("Invoice #{$id} is already paid"); } $this->getDi()->plugins_payment->loadEnabled(); $this->view->paysystems = $this->getDi()->paysystemList->getAllPublicAsArrays(); $this->view->invoice = $this->invoice; $this->view->id = $this->getFiltered('id'); } }
public function preDispatch() { $this->grid = $this->createGrid(); parent::preDispatch(); }
function preDispatch() { $this->user_id = intval($this->_request->user_id); if (!in_array($this->_request->getActionName(), array('log', 'invoice'))) { if ($this->user_id <= 0) { throw new Am_Exception_InputError("user_id is empty in " . get_class($this)); } } $this->setActiveMenu('users-browse'); return parent::preDispatch(); }