From d3114254cece570f41b5cf3bcc0e5e812cf80328 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 23 Jul 2020 15:53:38 +0200 Subject: [PATCH] Do not show the UM registration wizard for trial licenses. Ref pandora_enterprise#6141 --- .../include/functions_update_manager.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index 32a967753d..2ea5615088 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -53,6 +53,23 @@ function update_manager_verify_registration() return false; } +/** + * Check if a trial license is in use. + * + * @return boolean true if a trial license is in use, false otherwise. + */ +function update_manager_verify_trial() +{ + global $config; + + if (isset($config['license_licensed_to']) + && strstr($config['license_licensed_to'], 'info@pandorafms.com') !== FALSE + ) { + return true; + } + + return false; +} /** * Parses responses from configuration wizard. @@ -440,6 +457,11 @@ function registration_wiz_modal( global $config; $output = ''; + // Do not show the wizard for trial licenses. + if (update_manager_verify_trial()) { + return ''; + } + $product_name = get_product_name(); $output .= '