From 253b2fba90c19cc6758b8d63f409587df688a36e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 30 Nov 2023 09:47:00 +0000 Subject: usermanager, mod_auth_internal_hashed: Support metadata when disabling a user This allows us to store a time, actor, comment and/or reason why an account was disabled, which seems a generally useful thing to support. --- plugins/mod_auth_internal_hashed.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 32371618..4840f431 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -126,9 +126,10 @@ function provider.enable(username) return accounts:set(username, account); end -function provider.disable(username) +function provider.disable(username, meta) local account = accounts:get(username); account.disabled = true; + account.disabled_meta = meta; account.updated = os.time(); return accounts:set(username, account); end -- cgit v1.2.3