public function init() { if (!Yii::app()->params['local']) { Yii::app()->end(); } parent::init(); }
/** * Initializes the controller. */ public function init() { parent::init(); $this->_authorizer = $this->module->getAuthorizer(); $this->layout = $this->module->layout; $this->defaultAction = 'view'; // Register the scripts $this->module->registerScripts(); }
public function accessDenied($message = null) { Yii::app()->user->setState('Company', 0); if ($message === null) { $message = Rights::t('app', 'User is not asigned a role inside the company!'); } return parent::accessDenied($message); }