0
votes

How can I enable login with email in symfony2 fosUserBundle? I tried this:

providers:
    fos_userbundle:
        id: fos_user.user_provider.username_email

But got an error saying the service didn't exist.

Do I have to write my own functionality for this? I thought FosUserBundle came with it out of the box?

1

1 Answers

0
votes

Make sure you are using the 2.x version and not the 1.x version of the user bundle. Your composer.json should have something like: "friendsofsymfony/user-bundle": "dev-master",

You can also check in user-bundle resources security.xml to verify you have the correct version loaded.

The user bundle is a bit frustrating since only 1.0 has been released. Much of the good stuff is in 2.0 but it is still under development and has been for 2+ years.