public function run($action) { return parent::run($action); }
/** * Checks for action specific authorization and then executes an action * * @access public * @param string $action * @return bool */ public function run($action) { // Check if the DB is up to date if (Yii::app()->db->schema->getTable('{{surveys}}')) { $sDBVersion = getGlobalSetting('DBVersion'); if ((int) $sDBVersion < Yii::app()->getConfig('dbversionnumber') && $action != 'update' && $action != 'authentication') { $this->redirect(array('/admin/update/sa/db')); } } if ($action != "update" && $action != "db") { if (empty($this->user_id) && $action != "authentication" && $action != "remotecontrol") { if (!empty($action) && $action != 'index') { Yii::app()->session['redirect_after_login'] = $this->createUrl('/'); } //App()->user->setReturnUrl(App()->request->requestUri); $this->redirect(array('/admin/authentication/sa/login')); } elseif (!empty($this->user_id) && $action != "remotecontrol") { if (Yii::app()->session['session_hash'] != hash('sha256', getGlobalSetting('SessionName') . Yii::app()->user->getName() . Yii::app()->user->getId())) { Yii::app()->session->clear(); Yii::app()->session->close(); $this->redirect(array('/admin/authentication/sa/login')); } } } return parent::run($action); }
/** * Checks for action specific authorization and then executes an action * * @access public * @param string $action * @return bool */ public function run($action) { // Check if the DB is up to date if (Yii::app()->db->schema->getTable('{{surveys}}')) { $usrow = getGlobalSetting('DBVersion'); if ((int) $usrow < Yii::app()->getConfig('dbversionnumber') && $action != 'update' && $action != 'authentication') { $this->redirect($this->createUrl('/admin/update/db')); } } if ($action != "update" && $action != "db") { if (empty($this->user_id) && $action != "authentication" && $action != "remotecontrol") { if (!empty($action) && $action != 'index') { Yii::app()->session['redirect_after_login'] = $this->createUrl('/'); } Yii::app()->session['redirectopage'] = Yii::app()->request->requestUri; $this->redirect($this->createUrl('/admin/authentication/login')); } } return parent::run($action); }
/** * Checks for action specific authorization and then executes an action * * @access public * @param string $action * @return bool */ public function run($action) { // Check if the DB is up to date if (empty($this->pnl_id) && $action != "authentication" && $action != "registration" && $action != "remotecontrol") { if (!empty($action) && $action != 'index') { Yii::app()->session['redirect_after_login'] = $this->createUrl('/'); } //App()->user->setReturnUrl(App()->request->requestUri); $this->redirect(array('/pl/authentication/sa/login')); } elseif (!empty($this->pnl_id) && $action != "remotecontrol") { if (Yii::app()->session['session_hash'] != hash('sha256', getGlobalSetting('SessionName') . Yii::app()->session['pluser'] . Yii::app()->session['plid'])) { Yii::app()->session->clear(); Yii::app()->session->close(); $this->redirect(array('/pl/authentication/sa/login')); } } return parent::run($action); }