The FOSUserBundle adds support for a database-backed user system in Symfony2+. It provides a flexible framework for user management that aims to handle common tasks such as user registration and password retrieval.
Features include:
- Users can be stored via Doctrine ORM or MongoDB ODM
- Registration support, with an optional confirmation per email
- Password reset support
- Unit tested
Note: This bundle does not provide an authentication system but can provide the user provider for the core SecurityBundle.
The package only receives minimal maintenance to allow existing projects to upgrade. Existing projects are expected to plan a migration away from this bundle.
New projects should not use this bundle. It is actually much easier to implement the User entity in the project (allowing to fit exactly the need of the project). Regarding the extra features of the bundle:
- the EntityUserProvider of Symfony already provides the UserProvider when using the Doctrine ORM (and other object managers integrated with Symfony have an equivalent feature)
- change password is easy to implement in the project. That's a simple form relying on core Symfony features (the validator for the current password is in core since years)
- email verification is provided by https://github.com/SymfonyCasts/verify-email-bundle
- password reset is provided by https://github.com/SymfonyCasts/reset-password-bundle
- registration is easier to implement in the project directly to fit the need of the project, especially when the User entity is in the project. symfony/form already provides everything you need
- the ProfileController showing a profile page for the user is better done in projects needing it, as the content is likely not enough anyway
The source of the documentation is stored in the docs/
folder
in this bundle.
Read the Documentation for the current branch
This bundle is under the MIT license. See the complete license in the bundle
UserBundle is a knplabs initiative. See also the list of contributors.
Issues and feature requests are tracked in the Github issue tracker.
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.