iteration
This commit is contained in:
parent
b4d9af64d0
commit
f9ae7618c9
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user