From 26e325cdff90697d042337d9a2f669df91164436 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Fri, 20 Apr 2012 17:42:30 +0200 Subject: [PATCH] Fixed Symfony2 doc --- ...ny2-security-component-and-propel.markdown | 20 ++++++++++++++-- .../symfony2/working-with-symfony2.markdown | 24 +++++++++++-------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/cookbook/symfony2/the-symfony2-security-component-and-propel.markdown b/cookbook/symfony2/the-symfony2-security-component-and-propel.markdown index d2a50484..4472066b 100644 --- a/cookbook/symfony2/the-symfony2-security-component-and-propel.markdown +++ b/cookbook/symfony2/the-symfony2-security-component-and-propel.markdown @@ -11,13 +11,29 @@ If you've started to play with the awesome Symfony2 Security Component, you'll k 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: -``` yaml +{% 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`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/User/UserInterface.php): + +{% highlight php %} +