feat: 彻底禁用 Flarum 邮件通知
- 从驱动层移除 EmailNotificationDriver,禁止所有邮件通知发送 - 新用户注册时自动关闭邮件通知偏好兜底 - 站点通知保持不变
This commit is contained in:
15
extend.php
Normal file
15
extend.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace MetaZone\DisableEmailNotifications;
|
||||
|
||||
use Flarum\Extend;
|
||||
use Flarum\User\Event\Registered;
|
||||
use MetaZone\DisableEmailNotifications\Listener\DisableEmailNotificationsListener;
|
||||
|
||||
return [
|
||||
(new Extend\Event)
|
||||
->listen(Registered::class, DisableEmailNotificationsListener::class),
|
||||
|
||||
// 从驱动层彻底移除邮件通知,不依赖偏好设置
|
||||
new RemoveEmailDriver(),
|
||||
];
|
||||
Reference in New Issue
Block a user