aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-02-23 14:44:35 +0100
committerKim Alvefur <zash@zash.se>2023-02-23 14:44:35 +0100
commitfe206323b5a8e04c8c5efe2b6519ac9d7f611f91 (patch)
tree21e298ffe03336f1ba16c25e0d57021d9d916530 /plugins
parent96acef217098a0c0e7acebd6b162647167d11e25 (diff)
downloadprosody-fe206323b5a8e04c8c5efe2b6519ac9d7f611f91.tar.gz
prosody-fe206323b5a8e04c8c5efe2b6519ac9d7f611f91.zip
mod_auth_internal_hashed: Implement methods to enable and disable users
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_internal_hashed.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index d5fa8e12..0bafa23b 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -117,12 +117,17 @@ function provider.is_enabled(username) -- luacheck: ignore 212
return info.enabled;
end
-function provider.enable(username) -- luacheck: ignore 212
- error "NYI"
+function provider.enable(username)
+ -- TODO map store?
+ local account = accounts:get(username);
+ account.disabled = nil;
+ return accounts:set(username, account);
end
-function provider.disable(username) -- luacheck: ignore 212
- error "NYI"
+function provider.disable(username)
+ local account = accounts:get(username);
+ account.disabled = true;
+ return accounts:set(username, account);
end
function provider.users()