コード例 #1
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $excludeActions = array('admin_change_type', 'admin_unregister');
     if (in_array($this->request->params['action'], $excludeActions)) {
         $this->Security->validatePost = false;
         $this->Security->csrfCheck = false;
     }
 }
コード例 #2
0
 /**
  * Before executing controller actions
  *
  * @return void
  * @access public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $noCsrfCheck = array('admin_add', 'admin_resize');
     if (in_array($this->action, $noCsrfCheck)) {
         $this->Security->csrfCheck = false;
     }
     if ($this->action == 'admin_resize') {
         $this->Security->validatePost = false;
     }
 }