my code is:
add form token like this:
$this->add(new Hidden('token', array(
'name' => $this->security->getTokenKey(),
'value' => $this->security->getToken()
)));
add form token to html like this:
<form role="form" method="post" action="{{ url("user/save") }}" enctype="multipart/form-data" >
{{ form.render("token") }}
add token check to controller like this:
if (!$this->security->checkToken()) {
return $this->dispatcher->forward(array(
'controller' => 'user',
'action' => 'index'
));
}
but return always true! and not worked