Bulk Edit of Users

Post here if you have some suggestions or you want to request a new feature.

Bulk Edit of Users

Postby Morphius » Tue Jun 14, 2011 3:40 pm

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
Morphius
 
posts 1
 
joined Tue Jun 14, 2011 3:35 pm

Re: Bulk Edit of Users

Postby FTP » Wed Jun 15, 2011 2:05 am

You can handle it via Lua scripting, here is an example:

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


You can execute the above example script under "Administration -> Console", it just changes the connection limit for all the users: tableUser.max_connection = 10
FTP
Site Admin
 
posts 1200
 
joined Tue Sep 29, 2009 6:09 am


Return to Suggestions & Wishlist

Who is online

Users browsing this forum: No registered users and 3 guests