Example #1
0
 public function checkAuth()
 {
     parent::checkAuth();
     if ($this->hasLogin()) {
         return true;
     }
     if (array_key_exists($this->controllerName(), $this->publicActions)) {
         if ($this->publicActions[$this->controllerName()] == '*') {
             return true;
         }
         if (in_array($this->actionName(), $this->publicActions[$this->controllerName()])) {
             return true;
         }
     }
     $this->redirect('public/login');
 }