heimrichhannot / contao-login-registration-bundle
A frontend module that allows login and registration in one module.
Package info
github.com/heimrichhannot/contao-login-registration-bundle
Type:contao-bundle
pkg:composer/heimrichhannot/contao-login-registration-bundle
Requires
- php: ^8.3
- contao/core-bundle: ^5.3
- symfony/event-dispatcher-contracts: ^3.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/security-core: ^6.4 || ^7.0
- symfony/security-http: ^6.4 || ^7.0
- symfony/translation-contracts: ^3.0
Requires (Dev)
- contao/contao-rector: dev-main
- contao/manager-plugin: ^2.13
- phpstan/phpstan: ^2.1
- phpstan/phpstan-symfony: ^2.0
- rector/rector: ^2.6
- symplify/easy-coding-standard: ^12.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-26 08:05:49 UTC
README
This bundle provide a login frontend module allowing direct register the user if user not exist.
Usage
Requirements
- PHP ^8.3
- Contao ^5.3
Install
Install with contao manager or with composer:
composer require heimrichhannot/contao-login-registration-bundle
Update the database.
Setup
- Create a frontend module of type "Login Registration".
- Add the module to a page.
- For ease of usage, it is recommended to only allow email addresses as username.
You could adjust your dca accordingly or use a bundle to provide such functionality.
Otherwise, you need to implement a listener for
PrepareNewMemberDataEventto provide a user email address.
Developers
PHP Events
| Event | Description |
|---|---|
| AdjustUsernameEvent | Manipulate the username before checking for existing user or creating a new one. |
| PrepareNewMemberDataEvent | Adjust the new member data before the member is created. |
| BeforeParseModuleEvent | Manipulate the template data before rendering the frontend module. |
Exception handling
To pass an exception to the user, you can throw a \HeimrichHannot\LoginRegistrationBundle\Exception\InvalidRegistrationException
in your PrepareNewMemberDataEvent or AdjustUsernameEvent listener.
To adjust the message, that will be displayed to the use, use the BeforeParseModuleEvent.
