(29.04.2022, 11:15)admin Wrote: Create a scheduled script that runs as often as you want this data to be updated. Object type should be 250 byte string. Users are referenced by their login.Your support is just amazing guys,
Code:items = db:getall([[
SELECT login, MAX(created) accessed
FROM user_logs
WHERE failed IS NULL or failed=0
GROUP BY login
]])
logs = {}
for _, item in ipairs(items) do
logs[ item.login ] = os.date('%c', item.accessed)
end
grp.checkupdate('1/1/1', logs.admin)
grp.checkupdate('1/1/2', logs.some_other_user)
grp.checkupdate('1/1/3', logs.another_user)
THANKS A MILLION