Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-backend-lost-password-bundle
This bundle offers a lost password function for the backend of the Contao CMS.
https://github.com/heimrichhannot/contao-backend-lost-password-bundle
Last synced: about 1 month ago
JSON representation
This bundle offers a lost password function for the backend of the Contao CMS.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-backend-lost-password-bundle
- Owner: heimrichhannot
- License: other
- Created: 2020-01-06T11:20:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T14:24:50.000Z (7 months ago)
- Last Synced: 2024-11-09T14:46:14.264Z (about 2 months ago)
- Language: PHP
- Homepage:
- Size: 119 KB
- Stars: 3
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Contao Backend Lost Password Bundle
This bundle offers a lost password function for the backend of the Contao CMS.
![alt preview](docs/lost-password.png)
## 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.
- Select a mailer transport for outgoing mails in the settings.## Installation
1. Install via composer: `composer require heimrichhannot/contao-backend-lost-password-bundle` and update your database.
1. Set the `huh_backend_lost_password.add_to_template` to true if you want the lost password link automatically added to you backend login template.```yaml
# config/config.yml
huh_backend_lost_password:
add_to_template: true
```## Customize
### Use Notification center
You can use [Notification Center](https://github.com/terminal42/contao-notification_center) to send the password request.
1. Create a notification of type `User: Lost password` with `##recipient_email##` as recipient and content that contains `##link##` (the link to the password reset page).
You can use additional token: `##domain##` and user data withing `##user_*##`.
2. Set the id of the notification in your project configuration in `huh_backend_lost_password.nc_notification`.```yaml
# config/config.yml
huh_backend_lost_password:
nc_notification: 5
```### Usage in a custom template
You can insert the lost password link in a custom login template where you want by calling `BackendLostPasswortManager->getLostPasswordLink()`.
```
= System::getContainer()->get(\HeimrichHannot\BackendLostPasswordBundle\Manager\BackendLostPasswordManager::class)->getLostPasswordLink() ?>
```
### Adjust the email's text
**Hint: You can also set a notification center message by setting the id in your config.yml (see below).**
Simply override the following `$GLOBALS` entries:
```
$GLOBALS['TL_LANG']['MSC']['backendLostPassword']['messageSubjectResetPassword']
$GLOBALS['TL_LANG']['MSC']['backendLostPassword']['messageBodyResetPassword']
```## Configuration reference
```yaml
# Default configuration for extension with alias: "huh_backend_lost_password"
huh_backend_lost_password:# If true, that backend lost password link will be automatically added to the backed login template. Default false. Will be true in the next major version!
add_to_template: false# The numeric ID of the notification center notification which is sent for resetting the password.
nc_notification: false
```