From 4bfc75288f23c7c1b86303d35dd0715baa83a086 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 5 Feb 2024 20:40:12 +0100 Subject: [PATCH] =?UTF-8?q?13.1.04=20Evite=20la=20redirection=20vers=20une?= =?UTF-8?q?=20page=20d'erreur=20apr=C3=A8s=20un=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/user/user.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/module/user/user.php b/core/module/user/user.php index 223f5647..ae56634e 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -1063,7 +1063,13 @@ class user extends common ]); } else { $logStatus = 'Connexion réussie'; - $redirect = ($this->getUrl(2) && strpos($this->getUrl(2), 'user_reset') !== 0) ? helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))) : helper::baseUrl(); + $pageId = $this->getUrl(2); + if ($this->getData(['config', 'page404']) === $pageId + || $this->getData(['config', 'page403']) === $pageId + ) { + $pageId = ''; + } + $redirect = ($pageId && strpos($pageId, 'user_reset') !== 0) ? helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $pageId)) : helper::baseUrl(); // Valeurs en sortie $this->addOutput([ 'notification' => sprintf(helper::translate('Bienvenue %s %s'), $this->getData(['user', $userId, 'firstname']), $this->getData(['user', $userId, 'lastname'])),