public function init() { parent::init(); if (!$this->isAdmin()) { Admin::staticAdminLogon(); } }
/** * Constructor por defecto * @throws AccessDeniedException */ public function init() { parent::init(); if (!$this->isLogged()) { throw new UserAuthException(_("User not logged in")); } }
/** * Wrapper for json parent method with close transactions and close connectios tasks * * @param \PSFS\base\dto\JsonResponse $response * @param int $status * * @return string */ public function json($response, $status = 200) { $this->closeTransaction($status); Propel::closeConnections(); return parent::json($response, $status); }