English spoken conference

Symfony 5: The Fast Track

A new book to learn about developing modern Symfony 5 applications.

Support this project

WARNING: You are browsing the documentation for version 1.3.x which is not maintained anymore. If some of your projects are still using this version, consider upgrading.

Logging by Username or Email

Logging by Username or EmailΒΆ

As of the version 1.3.0, the bundle provides a built-in user provider implementation using both the username and email fields. To use it, simply change the id of your user provider to use this implementation instead of the base one using only the username:

1
2
3
4
5
# app/config/security.yml
security:
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.