From 00986c0172baddac5c8fe29acf2fe17966bb7b6a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 21 Sep 2012 17:24:44 +0200 Subject: storagemanager: Support for iterating over users --- core/storagemanager.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core') 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 -- cgit v1.2.3