Software /
code /
prosody
Changeset
5156:6b08c922a2e4
mod_auth_internal_{plain,hashed}: Add support for iterating over accounts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Sep 2012 17:26:12 +0200 |
parents | 5155:a207d4bff5a4 |
children | 5157:0e1686f334b8 |
files | plugins/mod_auth_internal_hashed.lua plugins/mod_auth_internal_plain.lua |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_auth_internal_hashed.lua Fri Sep 21 17:24:44 2012 +0200 +++ b/plugins/mod_auth_internal_hashed.lua Fri Sep 21 17:26:12 2012 +0200 @@ -102,6 +102,10 @@ 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", {});
--- a/plugins/mod_auth_internal_plain.lua Fri Sep 21 17:24:44 2012 +0200 +++ b/plugins/mod_auth_internal_plain.lua Fri Sep 21 17:26:12 2012 +0200 @@ -52,6 +52,10 @@ 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