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;