From 4804e0fa2d0371b2182275eae2e9ba95d42e6cbb Mon Sep 17 00:00:00 2001 From: mjansen Date: Wed, 13 Nov 2024 19:55:14 +0100 Subject: [PATCH] Init: Fix login url in startup metabar provider See: https://mantis.ilias.de/view.php?id=42681 (cherry picked from commit eb9e67c89b00e7ae57cc4e83c0ab5b8cf5005063) (cherry picked from commit 70efa389591f42774e3525ff0b1db3e09a43f701) --- Services/Init/classes/Provider/StartUpMetaBarProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Services/Init/classes/Provider/StartUpMetaBarProvider.php b/Services/Init/classes/Provider/StartUpMetaBarProvider.php index b0b14176a3db..35ce7755a9fd 100644 --- a/Services/Init/classes/Provider/StartUpMetaBarProvider.php +++ b/Services/Init/classes/Provider/StartUpMetaBarProvider.php @@ -58,12 +58,15 @@ public function getMetaBarItems(): array } $login_glyph = $factory->symbol()->glyph()->login(); + + $current_language = $this->dic->user()->getCurrentLanguage() ?: $this->dic->language()->getLangKey(); + $login = $this->meta_bar ->topLinkItem($if('login')) ->withAction( 'login.php?' . $target_str . 'client_id=' . rawurlencode( CLIENT_ID - ) . '&cmd=force_login&lang=' . $this->dic->user()->getCurrentLanguage() + ) . '&cmd=force_login&lang=' . $current_language ) ->withSymbol($login_glyph) ->withPosition(2)