Added new option to enable and disable reset pass

This commit is contained in:
Arturo Gonzalez 2017-04-20 15:31:39 +02:00
parent 14a3a79eb3
commit d93fa1bb3f
2 changed files with 14 additions and 6 deletions

View File

@ -212,6 +212,7 @@ echo '<div class="login_page">';
} }
if ($config['enterprise_installed']) { if ($config['enterprise_installed']) {
if ($config["reset_pass_option"]) {
$reset_pass_link = 'reset_pass.php'; $reset_pass_link = 'reset_pass.php';
// Reset password link // Reset password link
echo '<div style="width:70%; height:40px; margin-right:auto; margin-left:auto; margin-top:20px; text-align:center;">'; echo '<div style="width:70%; height:40px; margin-right:auto; margin-left:auto; margin-top:20px; text-align:center;">';
@ -219,6 +220,7 @@ echo '<div class="login_page">';
echo '</a>'; echo '</a>';
echo '</div>'; echo '</div>';
} }
}
echo '</form></div>'; echo '</form></div>';
echo '<div class="login_data">'; echo '<div class="login_data">';

View File

@ -245,6 +245,8 @@ function config_update_config () {
$error_update[] = __('Metaconsole agent cache'); $error_update[] = __('Metaconsole agent cache');
if (!config_update_value ('log_collector', (bool)get_parameter('log_collector'))) if (!config_update_value ('log_collector', (bool)get_parameter('log_collector')))
$error_update[] = __('Activate Log Collector'); $error_update[] = __('Activate Log Collector');
if (!config_update_value ('reset_pass_option', (bool)get_parameter('reset_pass_option')))
$error_update[] = __('Activate reset password');
$inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', array()); $inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', array());
if (!config_update_value ('inventory_changes_blacklist', implode(',',$inventory_changes_blacklist))) if (!config_update_value ('inventory_changes_blacklist', implode(',',$inventory_changes_blacklist)))
@ -1001,6 +1003,10 @@ function config_process_config () {
config_update_value ('log_collector', 0); config_update_value ('log_collector', 0);
} }
if (!isset ($config["reset_pass_option"])) {
config_update_value ('reset_pass_option', 0);
}
if (!isset ($config["include_agents"])) { if (!isset ($config["include_agents"])) {
config_update_value ('include_agents', 0); config_update_value ('include_agents', 0);
} }