Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.72 KB

the-symfony2-security-component-and-propel.markdown

File metadata and controls

73 lines (53 loc) · 2.72 KB
layout title
documentation
The Symfony2 Security Component And Propel

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 %}

app/config/security.yml

providers: main: propel: class: My\AwesomeBundle\Model\User property: username {% endhighlight %}

Your User class have to implement the UserInterface:

{% highlight php %}