public function filterSiteAccess($filterChain) { $actionId = $this->getAction()->getId(); if ($actionId != 'login' && $actionId != 'captcha' && $actionId != 'test' && (Yii::app()->user->isGuest || CommonUtil::getUserStatus(Yii::app()->user->signid) != 0)) { if ($actionId == 'refreshJson') { $this->layout = false; header('Content-type: application/json'); echo "this.location.href='/main/login.do'"; Yii::app()->end(); } $this->redirect("/main/login.do"); } date_default_timezone_set("PRC"); $this->term = CommonUtil::getCachedTerm(); //$auth=Yii::app()->authManager; //if($auth->getRoles(Yii::app()->user->id)) $filterChain->run(); }