--- a/mod_migrate/mod_migrate.lua Sun May 05 14:47:07 2019 +0200
+++ b/mod_migrate/mod_migrate.lua Sun May 05 16:04:20 2019 +0200
@@ -1,8 +1,17 @@
-- mod_migrate
+local unpack = table.unpack or unpack;
local sm = require"core.storagemanager";
local um = require"core.usermanager";
+local function users(store, host)
+ if store.users then
+ return store:users();
+ else
+ return um.users(host);
+ end
+end
+
function module.command(arg)
local host, source_stores, migrate_to = unpack(arg);
if not migrate_to then
@@ -62,7 +71,7 @@
end
else
xpcall(function()
- for user in um.users(host) do
+ for user in users(storage, host) do
migrate_user(user);
end
end,