diff options
author | Kim Alvefur <zash@zash.se> | 2012-09-21 17:26:12 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-09-21 17:26:12 +0200 |
commit | 05717a42cfadefb86cb8958b78e5102a3a09f27d (patch) | |
tree | a885f036c4b1ac9960ff33243c4fc7eee421639e | |
parent | 7d9e3dd14b295afd60fca09bd80c147b533153ff (diff) | |
download | prosody-05717a42cfadefb86cb8958b78e5102a3a09f27d.tar.gz prosody-05717a42cfadefb86cb8958b78e5102a3a09f27d.zip |
mod_auth_internal_{plain,hashed}: Add support for iterating over accounts
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 4 | ||||
-rw-r--r-- | plugins/mod_auth_internal_plain.lua | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index b61fba80..4535f9c9 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -102,6 +102,10 @@ function provider.user_exists(username) return true; end +function provider.users() + return datamanager.users(host, "accounts"); +end + function provider.create_user(username, password) if password == nil then return datamanager.store(username, host, "accounts", {}); diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua index b7723dd7..7514164d 100644 --- a/plugins/mod_auth_internal_plain.lua +++ b/plugins/mod_auth_internal_plain.lua @@ -52,6 +52,10 @@ function provider.user_exists(username) return true; end +function provider.users() + return datamanager.users(host, "accounts"); +end + function provider.create_user(username, password) return datamanager.store(username, host, "accounts", {password = password}); end |