heimrichhannot / contao-backend-lost-password-bundle
This bundle offers a lost password function for the backend of the Contao CMS.
Package info
github.com/heimrichhannot/contao-backend-lost-password-bundle
Type:contao-bundle
pkg:composer/heimrichhannot/contao-backend-lost-password-bundle
Requires
- php: ^8.3
- ext-dom: *
- contao/core-bundle: ^5.3
- heimrichhannot/contao-utils-bundle: ^3.3
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/mailer: ^6.4 || ^7.0
- symfony/rate-limiter: ^6.4 || ^7.0
- symfony/translation-contracts: ^1.0 || ^2.0 || ^3.0
- twig/twig: ^1.38 || ^2.8 || ^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.1
- symplify/easy-coding-standard: ^12.6
- terminal42/notification_center: ^2.6
README
This bundle offers a lost password function for the backend of the Contao CMS.
Features
- Never send new passwords to your customers again if they have forgotten their old ones. :-)
- After requesting a new password, a password reset link is sent to the user's email.
- Optional Notification Center support
Requirements
- Contao 5.3 or higher
- PHP 8.3 or higher
Installation and Setup
-
Install the extension via the Contao Manager or Composer:
composer require heimrichhannot/contao-backend-lost-password-bundle
-
Update your database.
-
Optional: Install Notification Center if you want to use it to send the password reset email.
-
Optional: To use a custom mailer transport with the built-in mailer, select it in the settings.
-
Optional: To use Notification Center, create a notification of type
User: Lost passwordand select it in the settings. See details below.
Customize
Password reset email
You have two options for sending the password reset email: you can either use the built-in mail function or Notification Center.
Built-in mail function
To adjust the email text, override the following labels:
$GLOBALS['TL_LANG']['MSC']['backendLostPassword']['messageSubjectResetPassword']
$GLOBALS['TL_LANG']['MSC']['backendLostPassword']['messageBodyResetPassword']
Notification Center
You can use Notification Center to send the password reset email.
- Create a notification of type
User: Lost passwordwith##recipient_email##as recipient and content that contains##link##(the link to the password reset page). You can also use the additional token##domain##and user data via##user_*##. - Select the notification in the settings.
Configuration reference
# Default configuration for extension with alias: "huh_backend_lost_password" huh_backend_lost_password: # Automatically add the backend lost password link to the backend login page. Set to false if you want to render the link manually in your template. # Default: true add_to_template: true
