登录注册体系的源码级硬切换
This commit is contained in:
@@ -81,36 +81,5 @@ require_once AKSRT_DIR . '/inc/modules/creator-revenue.php';
|
||||
// Stage 3: core hooks
|
||||
require_once AKSRT_DIR . '/inc/core-hooks.php';
|
||||
|
||||
// Stage 4: auth service hooks
|
||||
if (class_exists(\AKSRT\Auth\Service::class)) {
|
||||
\AKSRT\Auth\Service::init();
|
||||
}
|
||||
|
||||
// Stage 5: email verification backfill
|
||||
add_action('init', function () {
|
||||
if (defined('AKSRT_NO_EMAIL_GATE') && AKSRT_NO_EMAIL_GATE) {
|
||||
return;
|
||||
}
|
||||
if (!class_exists(\AKSRT\Auth\Service::class) || !class_exists(\AKSRT\Settings\Settings::class)) {
|
||||
return;
|
||||
}
|
||||
if (!\AKSRT\Settings\Settings::registration_requires_email_verification()) {
|
||||
return;
|
||||
}
|
||||
if (get_option('aksrt_email_verification_backfill_done')) {
|
||||
return;
|
||||
}
|
||||
if (!is_admin() && !(defined('DOING_CRON') && DOING_CRON)) {
|
||||
return;
|
||||
}
|
||||
\AKSRT\Auth\Service::backfill_legacy_users_as_verified();
|
||||
}, 5);
|
||||
|
||||
add_action('aksrt_email_verification_backfill_batch', function ($offset = 0) {
|
||||
if (class_exists(\AKSRT\Auth\Service::class)) {
|
||||
\AKSRT\Auth\Service::run_async_backfill_batch((int) $offset);
|
||||
}
|
||||
}, 10, 1);
|
||||
|
||||
add_action('admin_init', function () {
|
||||
}, 5);
|
||||
|
||||
Reference in New Issue
Block a user