layout | title |
---|---|
documentation |
The Symfony2 Security Component And Propel |
Warning: This documentation is for Symfony2 2.1. If you are using Symfony2 2.0.x, please follow this documentation.
If you've started to play with the awesome Symfony2 Security Component, you'll know that you can configure a provider
to retrieve your users. Symfony2, and the PropelBundle provide a propel
provider, so you just need to add the following
configuration to your security.yml
file:
{% highlight yaml %}
providers: main: propel: class: My\AwesomeBundle\Model\User property: username {% endhighlight %}
Your User
class have to implement the UserInterface
:
{% highlight php %}