19.10.2023, 12:58
Daniel's code will only log existing normal users (not admin). This script will log only failed attempts for all users:
Code:
items = db:getall([[
SELECT *
FROM user_logs
WHERE failed=1
ORDER BY user_logs.id DESC
LIMIT 50
]])
for _, item in ipairs(items) do
log(item.login, item.ip, item.created)
end