I'm looking for a script to me all users within a group whose access more than 180 days old is outputting . The result I would then send them by mail . Is such a thing possible ?
local domain = "demo"
local strUserlist = c_GetUserList(domain)
local userlist = Split(strUserlist, "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain, username)
local logintime = user.last_logintime
local logintime_t = c_TranslateTime(logintime)
if (os.time() - logintime_t) >= 3600*24*180 then
local userEmail = user.note_email
c_SendMail(userEmail,"FTP Account Expiration Alert","Dear FTP user,\r\n\r\n Your FTP account will be expired soon, please login the FTP server as soon as possible!","","SMTP_CONFIG")
Users browsing this forum: No registered users and 1 guest