diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index aab0b4c9e4..63daae2967 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -1252,9 +1252,8 @@ function check_permission_ldap( function fill_permissions_ldap($sr) { global $config; - $permissions = []; - if (!$config['ldap_advanced_config']) { + if ($config['autocreate_remote_users'] && $config['ldap_save_profile']) { $permissions[0]['profile'] = $config['default_remote_profile']; $permissions[0]['groups'][] = $config['default_remote_group']; $permissions[0]['tags'] = $config['default_assign_tags']; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 5435de5b8a..7b3c4b632b 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -604,6 +604,10 @@ function config_update_config() config_update_value('ldap_save_password', 1); } + if (!config_update_value('ldap_save_profile', get_parameter('ldap_save_profile'))) { + $error_update[] = __('Save profile'); + } + if (!config_update_value('rpandora_server', get_parameter('rpandora_server'))) { $error_update[] = __('MySQL host'); }