feat: derive autoresponder schedule from backend

This commit is contained in:
Marek Miklewicz
2026-06-02 19:55:07 +02:00
parent a0bd158a2e
commit f3abc7b33f
19 changed files with 248 additions and 43 deletions
+2
View File
@@ -12,6 +12,7 @@ define('PLUGIN_EXEC_DIR', __DIR__);
foreach ([
'Settings.php',
'BackendRuntimeConfig.php',
'Http.php',
'DirectAdminUser.php',
'Lang.php',
@@ -30,6 +31,7 @@ require_once PLUGIN_EXEC_DIR . '/handlers/_form_helpers.php';
try {
$settings = Settings::load(Settings::EXTERNAL_SETTINGS);
BackendRuntimeConfig::sync($settings, PLUGIN_ROOT . '/scripts/backend.sh', Settings::CONFIG_DIR . '/backend-state.json');
$user = DirectAdminUser::fromEnvironment($settings);
$lang = Lang::load($user->language(), $settings);
if (!$user->hasPluginAccess($settings)) {