List of users who haven't logged in the last 180 days

Please post here if you have problems in using FTP Rush.

List of users who haven't logged in the last 180 days

Postby mahesh.kumar » Sun Dec 30, 2018 10:04 pm

I am trying to print the list of users who haven't logged in the last 180 days. Below is my script:

do
local strUserlist = c_GetUserList("CNDC")
local userlist = Split(strUserlist,"\n")
for _,username in pairs(userlist) do
local user = c_GetUser("CNDC",username)
local logintime = user.last_logintime
local logintime_t = c_TranslateTime(logintime)
if (os.time() - logintime_t) >= 3600*24*180 then
print(c_GetUser("CNDC",username))
end
end
end

When I tried to run the script in console. It is my output

[table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value][table value]

How can I get the actual values?
mahesh.kumar
 
3
 
Wed Dec 26, 2018 8:49 pm

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest