Can't figure out the variable for the directory path for the user. I have this so far that will give me all expired accounts and the expiration date, but i would also like to list the directory path.
local domain = "basler.com"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain,username,dir)
if user.enable_expire == true then
local expiretime = c_TranslateTime(user.expiretime)
local nowtime = os.time()
if nowtime > expiretime then
print(username)
print(";")
print(user.expiretime)
print("\n")
end
end
end
Need help with LUA script to list all all users and their fi
-
- Posts: 4
- Joined: Tue Jun 08, 2021 1:35 pm
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Need help with LUA script to list all all users and thei
OK, you can list all the directory path by the following script:
Code: Select all
if user["directories"] ~= nil then
for _,directory in pairs(user["directories"]) do
if directory.is_home_dir then
print("Home dir: "..directory.dir.."\n")
else
print("Virtual dir: "..directory.dir.."\n")
end
end
print("\n\n")
end