Hi all
I have problems with the command: local strUserlist = c_GetUser(mydomain)
Last year (2023) it works, but now no longer.
Where is my fault?
The hole script is:
local mydomain = "xxx.com"
local rootdirtmp = "D:/ftp/kunden/"
local group = "Kunden"
do
local strUserlist = c_GetUser(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) and (user.usergroups[1].groupname == group) then
c_DeleteUser(mydomain,username)
c_RemoveFileDir(rootdirtmp .. username)
end
end
end
Thanks a lot at everybody!
LUA Script nil value
-
- Site Admin
- Posts: 2091
- Joined: Tue Sep 29, 2009 6:09 am
Re: LUA Script nil value
OK, if your domain name includes special characters, maybe you can write it as:
local mydomain = urlencode("xxx.com")
local mydomain = urlencode("xxx.com")
-
- Posts: 4
- Joined: Wed May 15, 2024 9:50 am
Re: LUA Script nil value
Thanks for your answer, but we didn't have any special characters. It's like "domain.com"
Nobody has changed something on the script.
With my script, it was running until the end of last year. (2023)
Did you have any other ideas?
-
- Site Admin
- Posts: 2091
- Joined: Tue Sep 29, 2009 6:09 am
Re: LUA Script nil value
OK, special characters include dot, just encode the domain name: local mydomain = urlencode("xxx.com")
-
- Posts: 4
- Joined: Wed May 15, 2024 9:50 am
Re: LUA Script nil value
OK, can you tell me, witch program I can use?
-
- Posts: 4
- Joined: Wed May 15, 2024 9:50 am
Re: LUA Script nil value
I had tried but that doesn't work either