01-30-2015, 09:45 AM
Thanks but I've already read the documentation about the csrf protection. My code is like that (I use Twig template) :
And my users_panel.twig contains between form tags :
So I don't understant why the access is already refused :/
PHP Code:
$this->data = array_merge($this->data, [
'page_title' => 'Rejoindre la communauté',
'set_login' => set_value('u_login'),
'set_email' => set_value('u_email'),
'set_password' => set_value('u_password'),
'set_pass_conf' => set_value('pass_conf'),
'csrf_name' => $this->security->get_csrf_token_name(),
'csrf_hash' => $this->security->get_csrf_hash(),
]);
$this->twig->display('site/user_register.twig', $this->data);
And my users_panel.twig contains between form tags :
Code:
<div class=" col-sm-offset-2 col-sm-10">
<input type="hidden" name="{{ csrf_name }}" value="{{ csrf_hash }}" />
<button type="submit" name="submit_new" class="btn btn-primary">S'inscrire<i class="icon-after fa fa-chevron-right" style="color:#FFF"></i></button>
</div>
So I don't understant why the access is already refused :/