diff --git a/include/lucidAuth.functions.php b/include/lucidAuth.functions.php index 11352c9..df2aab2 100644 --- a/include/lucidAuth.functions.php +++ b/include/lucidAuth.functions.php @@ -66,11 +66,11 @@ function storeToken (string $secureToken, string $qualifiedUsername, string $htt INSERT INTO SecureToken (UserId, Value) SELECT User.Id, :securetoken FROM User - WHERE User.Username = :qualifiedusername + WHERE LOWER(User.Username) = :qualifiedusername '); $pdoQuery->execute([ ':securetoken' => $secureToken, - ':qualifiedusername' => $qualifiedUsername + ':qualifiedusername' => strtolower($qualifiedUsername) ]); } catch (Exception $e) { @@ -118,10 +118,10 @@ function validateToken (string $secureToken) { FROM SecureToken LEFT JOIN User ON (User.Id=SecureToken.UserId) - WHERE User.Username = :username + WHERE LOWER(User.Username) = :username '); $pdoQuery->execute([ - ':username' => (string)$jwtPayload->sub + ':username' => (string) strtolower($jwtPayload->sub) ]); foreach($pdoQuery->fetchAll(PDO::FETCH_ASSOC) as $row) { try { diff --git a/include/lucidAuth.template.php b/include/lucidAuth.template.php index 4572173..7ee36c0 100644 --- a/include/lucidAuth.template.php +++ b/include/lucidAuth.template.php @@ -14,7 +14,6 @@ $pageLayout['full'] = <<<'FULL' -
@@ -47,7 +46,6 @@ $pageLayout['full_alt'] = <<<'FULL_ALT' -