aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-12 01:24:59 +0100
committerKim Alvefur <zash@zash.se>2023-03-12 01:24:59 +0100
commit5afb393d532dca85f66d34d238e37b437fc303c7 (patch)
treefda059c3130fe1c70004078fcffd7289849f7a75 /plugins
parent84c0204ea252f2464637de99a69bb87bce5b382a (diff)
downloadprosody-5afb393d532dca85f66d34d238e37b437fc303c7.tar.gz
prosody-5afb393d532dca85f66d34d238e37b437fc303c7.zip
mod_auth_internal_hashed: Record time of account disable / re-enable
Could be useful for e.g. #1772
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_internal_hashed.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index 598934d8..cd5e9364 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -123,12 +123,14 @@ function provider.enable(username)
-- 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