# HG changeset patch # User Kim Alvefur # Date 1348241172 -7200 # Node ID 6b08c922a2e4739ee0b33619c100392d80bf50eb # Parent a207d4bff5a4fd860c89aaf313ef193a3a847227 mod_auth_internal_{plain,hashed}: Add support for iterating over accounts diff -r a207d4bff5a4 -r 6b08c922a2e4 plugins/mod_auth_internal_hashed.lua --- 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", {}); diff -r a207d4bff5a4 -r 6b08c922a2e4 plugins/mod_auth_internal_plain.lua --- 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