Hello
Can we please request a utility / option to bulk edit user details. e.g. enabling zip files or changing connection limits for all users at once, or selected users at once.
Thanks
Bulk Edit of Users
-
- Site Admin
- Posts: 2082
- Joined: Tue Sep 29, 2009 6:09 am
Re: Bulk Edit of Users
You can handle it via Lua scripting, here is an example:
You can execute the above example script under "Administration -> Console", it just changes the connection limit for all the users: tableUser.max_connection = 10
Code: Select all
local strDomain = "YourDomain"
local strUserlist = c_GetUserList(strDomain)
local userlist = Split(strUserlist,"\n")
for _,username in pairs(userlist) do
local tableUser = c_GetUser(strDomain,username)
for k,v in pairs(tableUser) do
if type(v) == "boolean" then
if v == true then
tableUser[k] = 1
else
tableUser[k] = 0
end
end
end
tableUser.max_connection = 10
tableUser.oldpassword = tableUser.password
AddUser(strDomain,tableUser)
end