feat: unify invite flow with referral ref

This commit is contained in:
2026-08-17 13:49:59 +08:00
parent f1d6809109
commit b501cf4611
47 changed files with 1083 additions and 2548 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ class EmailVerification {
update_user_meta($user_id, Service::EMAIL_VERIFIED_META, 1);
self::clear_email_verification($user_id);
// 仅在状态由"未验证 → 已验证"跳变时触发,避免历史 backfill / 重复调用造成奖励重发。
// 监听方负责自己幂等(aksrt_invite 表的 status 检查已经做到这一点)。
// 监听方负责自己幂等(Ref 关系使用原子奖励状态处理重复事件)。
if (!$was_verified) {
do_action('aksrt_email_verified', $user_id);
}
@@ -447,7 +447,7 @@ class EmailVerification {
update_user_meta($user_id, Service::EMAIL_VERIFIED_META, 1);
self::clear_email_verification($user_id);
Service::log_event('verify.success', ['uid' => $user_id]);
// 状态跳变时触发 hook,邀请系统等模块据此发奖
// 状态跳变时触发 hook,Ref 推广奖励等模块据此发奖
if (!$was_verified) {
do_action('aksrt_email_verified', $user_id);
}