diff --git a/front/login.php b/front/login.php index 3d00ea91423..14170ce44ac 100644 --- a/front/login.php +++ b/front/login.php @@ -90,7 +90,7 @@ Auth::redirectIfAuthenticated(); } else { TemplateRenderer::getInstance()->display('pages/login_error.html.twig', [ - 'error' => $auth->getErr(), + 'errors' => $auth->getErrors(), 'login_url' => $CFG_GLPI["root_doc"] . '/front/logout.php?noAUTO=1' . str_replace("?", "&", $REDIRECT), ]); exit(); diff --git a/src/Api/API.php b/src/Api/API.php index 6a902d674ad..e2d6f5566dc 100644 --- a/src/Api/API.php +++ b/src/Api/API.php @@ -299,7 +299,7 @@ protected function initSession($params = []) // login on glpi if (!$auth->login($params['login'], $params['password'], $noAuto, false, $params['auth'])) { - $err = Toolbox::stripTags($auth->getErr()); + $err = implode(' ', $auth->getErrors()); if ( isset($params['user_token']) && !empty($params['user_token']) diff --git a/src/Auth.php b/src/Auth.php index 3ac7e9b14fa..1ebcfcfebf4 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -649,6 +649,8 @@ public function getAlternateAuthSystemsUserLogin($authtype = 0) * Get the current identification error * * @return string current identification error + * + * @TODO Deprecate this in GLPI 10.1. */ public function getErr() { diff --git a/templates/pages/login_error.html.twig b/templates/pages/login_error.html.twig index a750a9ec6b9..24601b15e99 100644 --- a/templates/pages/login_error.html.twig +++ b/templates/pages/login_error.html.twig @@ -44,7 +44,9 @@ {{ __("Error") }}
- {{ error }} + {% for error in errors %} + {{ error }}
+ {% endfor %}