diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-11-30 09:47:00 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-11-30 09:47:00 +0000 |
commit | 253b2fba90c19cc6758b8d63f409587df688a36e (patch) | |
tree | 62640ad193c9db1548eb18a208fe00a4e706776a /core | |
parent | b97c4ffc16fe14fcf40d4808835b3fa3c46e9b1c (diff) | |
download | prosody-253b2fba90c19cc6758b8d63f409587df688a36e.tar.gz prosody-253b2fba90c19cc6758b8d63f409587df688a36e.zip |
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.
Diffstat (limited to 'core')
-rw-r--r-- | core/usermanager.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 |