Dear All,
Because we have many accounts in Wing ftp server. How can I list the expired account list? I want to delete them.
Thanks for your reply!
How can I list the expired account list?
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: How can I list the expired account list?
OK, you can use the following Lua script to print all the expired accounts:
Code: Select all
local mydomain = "YourDomainName"
do
local strUserlist = c_GetUserList(mydomain)
local userlist = Split(strUserlist,"\n")
for _,username in pairs(userlist) do
local user = c_GetUser(mydomain,username)
local expiretime_t = c_TranslateTime(user.expiretime)
if (os.time() > expiretime_t) and (user.enable_expire == true) then
print(username.."\n")
end
end
end