Example #1
0
 protected function runAction($action)
 {
     switch ($action) {
         case 'vote':
             return !is_null($id = $this->fromGet()) && !is_null($answer = $this->fromGet('answer')) && $this->actionVote($id, $answer);
     }
     return parent::runAction($action);
 }
Example #2
0
 protected function runAction($action)
 {
     switch ($action) {
         case 'view':
             // In the user module, the view action requires 'admin' privileges
             return null;
         case 'login':
             return isset($this->keys['CID']) ? null : $this->actionLogin();
     }
     return parent::runAction($action);
 }