[英]FOSUserBundle Confirmation after registration
I have activated in the FOSUserBundle the email confirmation. 我在FOSUserBundle中激活了电子邮件确认。 It allows users to receive a link by mail after they registration.
它允许用户在注册后通过邮件接收链接。
registration:
confirmation:
enabled: true
But It's not really what I want. 但这不是我想要的。 I just want to send a welcome mail to confirm their registration (with no confirmation link).
我只是想发一封欢迎邮件来确认他们的注册(没有确认链接)。
Is it possible to configurate that in the FOSUserBundle? 可以在FOSUserBundle中配置它吗?
You can set a custom template for the email sent after registration: 您可以为注册后发送的电子邮件设置自定义模板:
confirmation:
enabled: true
template: YourUserBundle:Registration:email.txt.twig
Copy the default FOSUserBundle:Registration:email.txt.twig
and remove the confirmation link. 复制默认的
FOSUserBundle:Registration:email.txt.twig
并删除确认链接。
But as the confirmation
is set to true
, your users will not be enabled
by default. 但是,当
confirmation
设置为true
,默认情况下不会enabled
您的用户。
So, if you want disable the whole confirmation feature, you can: 因此,如果要禁用整个确认功能,您可以:
FOS\\UserBundle\\Controller\\RegistrationController
to send a custom e-mail FOS\\UserBundle\\Controller\\RegistrationController
以发送自定义电子邮件 FOSUserEvents::REGISTRATION_CONFIRMED
FOSUserEvents::REGISTRATION_CONFIRMED
上发送自定义电子邮件的侦听器 Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.