local domain = "domain123"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain,username)
if user.enable_expire == true then
local expiretime = c_TranslateTime(user.expiretime)
local nowtime = os.time()
if nowtime > expiretime then
print(username)
print("\n")
end
end
endlocal content = ""
local domain = "domain123"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain,username)
if user.enable_expire == true then
local expiretime = c_TranslateTime(user.expiretime)
local nowtime = os.time()
if nowtime > expiretime then
content = content..username.."\n"
end
end
end
if content ~= "" then
local fp = assert(io.open("c:/test.log", "wb"))
fp:write(content)
fp:close()
endspliusko wrote:Never mind. It evidently didn't like the fact that I copied and pasted the entire script. I copied and pasted the script one line at a time, and it took it without any errors.
Users browsing this forum: Google [Bot] and 1 guest