Hi,
Im trying to use the OnQuotaExceeded event to disable a user's account but i can't seem to get it to work correctly.
here's the Lua script im using:
local tableUser = c_GetUser("%Domain","%Name")
--change all the boolean values into integer values
for k,v in pairs(tableUser) do
if type(v) == "boolean" then
if v == true then
tableUser[k] = 1
else
tableUser[k] = 0
end
end
end
bEnableAccount "0"
AddUser("%Domain","%Name")
I'll also be running a similar script every month to re-enable the account, giving the user another month of storage.
Any help would be greatly appreciated.
-Keith-
Disable a User when they exceed their monthly Quota
-
- Posts: 1
- Joined: Fri Jun 01, 2012 9:55 am
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Disable a User when they exceed their monthly Quota
tableUser.enable_account = 0