Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable form security CakePHP

Is it possible to turn of all CakePHP security features for only 1 particular form in a view? So I don't get any hidden fields (tokens) in that form.

Thank you,

Bart

like image 366
user1447499 Avatar asked Jun 12 '12 19:06

user1447499


1 Answers

You can disable it for that action via:

public function beforeFilter() {
    parent::beforeFilter();
    if ($this->request->params['action'] == 'action') { 
        $this->Security->validatePost = false; 
    } 
}
like image 189
tigrang Avatar answered Sep 30 '22 15:09

tigrang