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. --- core/usermanager.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/usermanager.lua b/core/usermanager.lua index 37fd38a9..793e7af6 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -163,12 +163,12 @@ local function enable_user(username, host) return ret, err; end -local function disable_user(username, host) +local function disable_user(username, host, meta) local method = hosts[host].users.disable; if not method then return nil, "method not supported"; end - local ret, err = method(username); + local ret, err = method(username, meta); if ret then - prosody.events.fire_event("user-disabled", { username = username, host = host }); + prosody.events.fire_event("user-disabled", { username = username, host = host, meta = meta }); end return ret, err; end -- cgit v1.2.3