iteration

This commit is contained in:
Layla 2023-10-08 05:07:48 -04:00
parent b4d9af64d0
commit f9ae7618c9

View File

@ -77,12 +77,11 @@ while true do
password = convert_password(request.password)
}
-- if only user in database, add to admin group
log(table.getn(data.users))
if table.getn(data.users) == 0 then
log("Adding " .. request.username .. " to admin group")
data.users[request.username].groups = {}
data.users[request.username].groups["admin"] = true
local user_count = #data.users
if user_count == 1 then
data.users[request.username].groups = {
["admin"] = true
}
end
save_data()