From a5d5a1819001fd90ad0659cdcf07e765fd706e84 Mon Sep 17 00:00:00 2001 From: Gauthier DUPONT Date: Fri, 7 Mar 2025 14:01:40 +0100 Subject: [PATCH] =?UTF-8?q?fix(mail):=20suppresion=20du=20lower=20sur=20la?= =?UTF-8?q?=20colonne=20mail=20de=20la=20requ=C3=AAte=20suite=20au=20login?= =?UTF-8?q?,=20traitement=20du=20lwoer=20en=20PHP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SQLLogin/SQLLoginRequest.php | 2 +- src/Service/SQLLoginService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SQLLogin/SQLLoginRequest.php b/src/SQLLogin/SQLLoginRequest.php index 82a0b17..0f173f4 100644 --- a/src/SQLLogin/SQLLoginRequest.php +++ b/src/SQLLogin/SQLLoginRequest.php @@ -103,6 +103,6 @@ class SQLLoginRequest { $fields = join(',', array_merge($this->getPasswordFields(), $this->getDataFields())); - return 'SELECT '.$fields.' FROM '.$this->getTableName().' WHERE LOWER('.$this->getLoginColumnName().') = LOWER(:'.$this->getLoginColumnName().');'; + return 'SELECT '.$fields.' FROM '.$this->getTableName().' WHERE '.$this->getLoginColumnName().' = :'.$this->getLoginColumnName().';'; } } diff --git a/src/Service/SQLLoginService.php b/src/Service/SQLLoginService.php index aeb1477..b8ccf1f 100644 --- a/src/Service/SQLLoginService.php +++ b/src/Service/SQLLoginService.php @@ -24,6 +24,7 @@ class SQLLoginService extends AbstractController public function fetchPasswordAndDatas(string $login): array { $dataRequest = $this->sqlLoginRequest->getDatasRequest(); + $login = \strtolower($login); $datas = $this->executeRequestWithLogin($dataRequest, $login); return $datas; -- 2.17.1