daddl3/email_with_login_link_and_change_password 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

daddl3/email_with_login_link_and_change_password

最新稳定版本:1.0.1

Composer 安装命令:

composer require daddl3/email_with_login_link_and_change_password

包简介

Symfony Bundle for automatic E-Mail sending with Login Link

README 文档

README

Pipeline Status Version

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_and_change_password

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

I add the event to the rendering, so you can use this in your twig file.

统计信息

  • 总下载量: 458
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-05