daddl3/email_with_login_link_and_change_password
最新稳定版本:0.0.5
Composer 安装命令:
composer require daddl3/email_with_login_link_and_change_password
包简介
Symfony Bundle for automatic E-Mail sending with Login Link
README 文档
README
Email Login When Creating A User And Change Password
Send an E-Mail with a Login Link
Getting started
This bundle helps you to send an E-Mail to a User automatically
Installation
$ composer requ daddl3/email_with_login_link
Config
Add the following into your security.yaml
security:
firewalls:
main:
login_link:
check_route: login_check
lifetime: 86400
signature_properties: [ 'id', 'email' ]
This config defines how long the link is valid. The signature_properties has to be in your UserInterface The Field 'email' and 'id' in your UserInterface is needed. The Field 'fullname' is optional.
Your provider class has to have getters and setters like this
$user
->setPassword($encodedPassword)
->setSetOwnPassword(true);
Information
An example to set this email
$this->eventDispatcher->dispatch(
new EmailOnCreationEvent(
providerClass: App\Entity\User,
sender: new Adress('email@example.de', 'Mr. Daddl3'),
subject: 'An User was created',
cc: 'email@example.de',
bcc: 'email@example.de',
replyTo: new Address('email@example.de'),
priority: Email::PRIORITY_HIGH
)
);
Have a look to the types.
If you want to overwrite the twig file use the normal bundle overwrite for it:
- templates
- bundles
- EmailLoginWhenCreatingAUser
- email.html.twig
- EmailLoginWhenCreatingAUser
- bundles
I add the event to the rendering, so you can use this in your twig file.
统计信息
- 总下载量: 421
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-05