aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-09-02 18:55:35 +0100
committerMatthew Wild <mwild1@gmail.com>2015-09-02 18:55:35 +0100
commit95e9399b77a5b7e5520cc1187c267171d4c494b7 (patch)
tree75ae2e07fd0ffea8a7063e9fbc3e5dbd0108d619 /core
parent1b379adbc661947763a198ea2a3e114359fafe82 (diff)
parent388fa0cd28e4a9911f6d6504e15126071952a453 (diff)
downloadprosody-95e9399b77a5b7e5520cc1187c267171d4c494b7.tar.gz
prosody-95e9399b77a5b7e5520cc1187c267171d4c494b7.zip
Merge 0.10->trunk
Diffstat (limited to 'core')
-rw-r--r--core/storagemanager.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua
index 45a1e21c..046f496a 100644
--- a/core/storagemanager.lua
+++ b/core/storagemanager.lua
@@ -134,9 +134,14 @@ local function purge(user, host)
if type(storage) == "table" then
-- multiple storage backends in use that we need to purge
local purged = {};
- for store, driver in pairs(storage) do
- if not purged[driver] then
- purged[driver] = get_driver(host, store):purge(user);
+ for store, driver_name in pairs(storage) do
+ if not purged[driver_name] then
+ local driver = get_driver(host, store);
+ if driver.purge then
+ purged[driver_name] = driver:purge(user);
+ else
+ log("warn", "Storage driver %s does not support removing all user data, you may need to delete it manually", driver_name);
+ end
end
end
end
@@ -172,6 +177,7 @@ return {
load_driver = load_driver;
get_driver = get_driver;
open = open;
+ purge = purge;
olddm = olddm;
};