When the cron module is being used as an API in usermin, leave user switching up to the caller

This commit is contained in:
Jamie Cameron
2023-04-18 10:11:49 -07:00
parent a89415739b
commit db8d712d83

View File

@@ -19,7 +19,9 @@ use WebminCore;
$env_support = $config{'vixie_cron'};
if ($module_info{'usermin'}) {
$single_user = $remote_user;
&switch_to_remote_user();
if (!$ENV{'FOREIGN_MODULE_NAME'}) {
&switch_to_remote_user();
}
&create_user_config_dirs();
$range_cmd = "$user_module_config_directory/range.pl";
$hourly_only = 0;