Software /
code /
prosody
Changeset
5155:a207d4bff5a4
storagemanager: Support for iterating over users
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Sep 2012 17:24:44 +0200 |
parents | 5154:429c8eeea035 |
children | 5156:6b08c922a2e4 |
files | core/storagemanager.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/storagemanager.lua Fri Sep 21 17:24:06 2012 +0200 +++ b/core/storagemanager.lua Fri Sep 21 17:24:44 2012 +0200 @@ -118,6 +118,13 @@ 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