mod_auth_internal_hashed: Record time of account disable / re-enable
authorKim Alvefur <zash@zash.se>
Sun, 12 Mar 2023 01:24:59 +0100
changeset 12937 3ab0bbb1dc35
parent 12936 9bb044705ea1
child 12938 c6dffebab2f8
mod_auth_internal_hashed: Record time of account disable / re-enable Could be useful for e.g. #1772
plugins/mod_auth_internal_hashed.lua
--- a/plugins/mod_auth_internal_hashed.lua	Tue Mar 14 18:24:58 2023 +0000
+++ b/plugins/mod_auth_internal_hashed.lua	Sun Mar 12 01:24:59 2023 +0100
@@ -123,12 +123,14 @@
 	-- TODO map store?
 	local account = accounts:get(username);
 	account.disabled = nil;
+	account.updated = os.time();
 	return accounts:set(username, account);
 end
 
 function provider.disable(username)
 	local account = accounts:get(username);
 	account.disabled = true;
+	account.updated = os.time();
 	return accounts:set(username, account);
 end