diff options
author | Kim Alvefur <zash@zash.se> | 2023-02-23 14:44:35 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-02-23 14:44:35 +0100 |
commit | fe206323b5a8e04c8c5efe2b6519ac9d7f611f91 (patch) | |
tree | 21e298ffe03336f1ba16c25e0d57021d9d916530 | |
parent | 96acef217098a0c0e7acebd6b162647167d11e25 (diff) | |
download | prosody-fe206323b5a8e04c8c5efe2b6519ac9d7f611f91.tar.gz prosody-fe206323b5a8e04c8c5efe2b6519ac9d7f611f91.zip |
mod_auth_internal_hashed: Implement methods to enable and disable users
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 13 |
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() |