logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Where do I find the current CSRF value?

Symfony 1.4 using Propel.

The default login form for sfGuardUser will produce something like this:

<input type="hidden" name="signin[_csrf_token]" value="96861c5f7c3dca8e9c0e169700c764ed" id="signin__csrf_token" />


My client wants a complicated, highly detailed custom login screen. Their designer built out the mockup of this form using Dreamweaver, and the form is rich with CSS, HTML, and Javascript. So I have overriden the default sfGuardAuth module and I copy and pasted the clients CSS/HTML/Javascript to the form.

Now I need to copy over the fields that sfGuardUser needs. This is easy, except for the CSRF field. I can not find where that value is stored. It does not appear to be a field inside of the form. I tried:

<?php echo $form['_csrf_token'] ?>

but that did not work. So where do I find this value?

This question has been answered.

Lawrence Krubner | 12/07/12 at 6:01pm Edit


(1) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    12/07/12
    6:07pm
    mullerivan says:

    easy

    $form->renderHiddenFields()

This question has expired.



Lawrence Krubner voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.