20.10.2023, 05:53
(19.10.2023, 12:58)admin Wrote: Daniel's code will only log existing normal users (not admin). This script will log only failed attempts for all users:Hello admin,
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
This script is functioning, but it logs full even when there is just one incorrect password attempt. Could you please explain what it does exactly? I want it to log only the actual instances of entering the wrong password.