Reputation: 711
Once I've logged a user via a firewall setting redirecting them to a login page... how do I access their data? Is that even possible.
My issue is I've got a login for that apparently works, but keeps just showing the login form over and over... I can't get any errors as to what's happening behind the scenes..
How can I add errors to my login form to see what's failing and why.
Upvotes: 0
Views: 49
Reputation: 114
Are you sure that you are displaying the errors messages on your template?
The common practice would be to use something like the code fragment below to display the error message
{% if error %}
<p>{{error.messageKey|trans(error.messageData, 'security') }}</p>
{% endif %}
But you might even want to use the dump function just to see if the error object has any information that is useful.
You might as well want to extend the AbstractFormLoginAuthenticator and implement its methods.
This is a good tutorial that might help you
http://www.sensiolabsblog.co.uk/blog/symfony-security-component-guard-tutorial
Upvotes: 1