File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -245,16 +245,18 @@ public function removeExpired(): void
245245 {
246246 $ accessTokenTableName = $ this ->getTableName ();
247247 $ refreshTokenTableName = $ this ->database ->applyPrefix (RefreshTokenRepository::TABLE_NAME );
248+ $ now = $ this ->helpers ->dateTime ()->getUtc ()->format (DateFormatsEnum::DB_DATETIME ->value );
248249
249250 // Delete expired access tokens, but only if the corresponding refresh token is also expired.
250251 $ this ->database ->write (
251252 "DELETE FROM $ accessTokenTableName WHERE expires_at < :now AND
252253 NOT EXISTS (
253254 SELECT 1 FROM {$ refreshTokenTableName }
254- WHERE $ accessTokenTableName.id = $ refreshTokenTableName.access_token_id AND expires_at > :now
255+ WHERE $ accessTokenTableName.id = $ refreshTokenTableName.access_token_id AND expires_at > :now2
255256 ) " ,
256257 [
257- 'now ' => $ this ->helpers ->dateTime ()->getUtc ()->format (DateFormatsEnum::DB_DATETIME ->value ),
258+ 'now ' => $ now ,
259+ 'now2 ' => $ now ,
258260 ],
259261 );
260262 }
You can’t perform that action at this time.
0 commit comments