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; } }
/** * 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; } }