# 用户更新主邮箱时通知管理员

**URL:** https://meta.discourse.org/t/notify-admins-if-a-user-updates-their-primary-email/274850
**Category:** Support
**Created:** [2023 年8 月 11 日 19:26 UTC](https://meta.discourse.org/t/notify-admins-if-a-user-updates-their-primary-email/274850 "2023-08-11T19:26:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![GForce2010](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@GForce2010](https://meta.discourse.org/u/GForce2010)
#### Post date: [2023 年8 月 11 日 19:26 UTC](https://meta.discourse.org/t/notify-admins-if-a-user-updates-their-primary-email/274850/1 "2023-08-11T19:26:47Z")

</div>

我尝试搜索过，但找不到关于此是否可行的答案。

我帮助管理一个本地会员小组，我们有一个 Discourse 实例，由于 BTS 管理，我们需要在几个地方存储会员信息。

我们正在转向单一解决方案，但在此期间发生过几次用户更改了他们的主电子邮件而没有通知我们。这本身没问题，我宁愿用户更新他们更改的电子邮件，但问题是我们不知道我们需要在其他地方更新它。

我猜是不是有一个设置可以让 Discourse 在用户更新其主电子邮件地址时通知管理员组？

谢谢。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2023 年8 月 11 日 19:29 UTC](https://meta.discourse.org/t/notify-admins-if-a-user-updates-their-primary-email/274850/2 "2023-08-11T19:29:28Z")

</div>

我的最佳想法是使用 webhook：“用户事件\n当用户登录、登出、确认其电子邮件、被创建、被批准或被更新时。”然后你需要以某种方式捕获它并过滤掉你不关心的内容。

---

<div class="post-metadata">

### Author: ![ClawdiaWolf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clawdiawolf/32/262518_2.png) [@ClawdiaWolf](https://meta.discourse.org/u/ClawdiaWolf)
#### Post date: [2023 年8 月 11 日 21:09 UTC](https://meta.discourse.org/t/notify-admins-if-a-user-updates-their-primary-email/274850/3 "2023-08-11T21:09:45Z")

</div>

我实际上有一些无法使用 [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) 实现共享登录的实例，因此，正如建议的那样，我们使用 webhook 来捕获事件。

我们现有的系统具有可以实时更新用户的 API 调用，因此我们仅在用户确认电子邮件时过滤挂钩，然后它会自动更新其他系统。

如果您的系统支持，这可能是您的最佳选择。如果不支持，您总是可以让系统发送电子邮件或使用 Discourse API 向需要通知您管理团队的用户发送群组 PM。 🙂
