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 /plugins/mod_auth_internal_hashed.lua | |
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 'plugins/mod_auth_internal_hashed.lua')
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |