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' -
diff --git a/public/lucidAuth.manage.php b/public/lucidAuth.manage.php index 7488b9d..c6ea335 100644 --- a/public/lucidAuth.manage.php +++ b/public/lucidAuth.manage.php @@ -22,8 +22,8 @@ throw new Exception($e); } foreach($allUsers as $row) { - $tableRows[] = sprintf('%3$s%4$s%5$s', - $validateTokenResult['uid'] === $row['Id'] ? 'class="currentuser"': null, + $tableRows[] = sprintf('%3$s%4$s%5$s', + $validateTokenResult['uid'] === $row['Id'] ? ' class="currentuser"': null, $row['Id'], explode('\\', $row['Username'])[1], $row['Rolename'],