smr/src/sql/select_valid_sessions.sql
Robin Malley 9444d300b8 Allow logged in users to use their session immediately.
Fix a bug where unit tests are attempting to log in and use their
session key in the same second that the session key was created.
2021-09-11 21:50:23 +00:00

7 lines
172 B
SQL

SELECT authors.name, authors.id
FROM authors, sessions
WHERE
sessions.key = :key AND
sessions.author = authors.id AND
sessions.start - strftime('%s','now') <= 60*60*24;