From 83f3c310e56acc1a1a96cb7d84ee44fa2f7bba32 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 19 Jul 2024 15:15:09 +0200 Subject: [PATCH] fix typo prefer(r)ed_username and support config-values with at least one underscore in it like "preferred_username" --- setup/config.php | 5 +++++ setup/templates/default/config.tpl | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/setup/config.php b/setup/config.php index 65d6836dd0..49c83430fd 100644 --- a/setup/config.php +++ b/setup/config.php @@ -183,6 +183,11 @@ foreach($vars as $value) $newvals = explode(' ',$newval); $setting = array_pop($newvals); $config = implode('_',$newvals); + if (!isset($current_config[$config])) + { + $setting = array_pop($newvals).'_'.$setting; + $config = implode('_', $newvals); + } /* echo $config . '=' . $current_config[$config]; */ if($current_config[$config] == $setting) { diff --git a/setup/templates/default/config.tpl b/setup/templates/default/config.tpl index c673c5669a..d4807c6792 100644 --- a/setup/templates/default/config.tpl +++ b/setup/templates/default/config.tpl @@ -497,10 +497,10 @@ {lang_Name_of_JWT_payload_attribute_for_username}: