diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/storagemanager.lua | 7 | ||||
-rw-r--r-- | core/usermanager.lua | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua index 5a7bb7bd..36a671be 100644 --- a/core/storagemanager.lua +++ b/core/storagemanager.lua @@ -118,6 +118,13 @@ end function datamanager.store(username, host, datastore, data) return open(host, datastore):set(username, data); end +function datamanager.users(host, datastore, typ) + local driver = open(host, datastore, typ); + if not driver.users then + return function() log("warn", "storage driver %s does not support listing users", driver.name) end + end + return driver:users(); +end function datamanager.stores(username, host, typ) return get_driver(host):stores(username, typ); end diff --git a/core/usermanager.lua b/core/usermanager.lua index 0ed61f23..417d7037 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -96,6 +96,10 @@ function delete_user(username, host) return storagemanager.purge(username, host); end +function users(host) + return hosts[host].users.users(); +end + function get_sasl_handler(host, session) return hosts[host].users.get_sasl_handler(session); end |