aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-11-07 21:53:40 +0100
committerKim Alvefur <zash@zash.se>2018-11-07 21:53:40 +0100
commitef25fe98b2c605335e9f31e363eb49a832ca9f48 (patch)
tree4a6af8ab32ff0fabb03a861461739530aec03738 /plugins
parent48162c5fca869aa8adefc5dc7e8a58bf1ce40c20 (diff)
parent88b509b8350eb652110fe5ebc1f2ff55c3f567a4 (diff)
downloadprosody-ef25fe98b2c605335e9f31e363eb49a832ca9f48.tar.gz
prosody-ef25fe98b2c605335e9f31e363eb49a832ca9f48.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register.lua1
-rw-r--r--plugins/mod_register_ibr.lua4
-rw-r--r--plugins/mod_storage_memory.lua6
3 files changed, 10 insertions, 1 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index 49ff8a38..763e2fd9 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -11,7 +11,6 @@ local allow_registration = module:get_option_boolean("allow_registration", false
if allow_registration then
module:depends("register_ibr");
- module:depends("register_limits");
end
module:depends("user_account_management");
diff --git a/plugins/mod_register_ibr.lua b/plugins/mod_register_ibr.lua
index abfc1079..bbe7581d 100644
--- a/plugins/mod_register_ibr.lua
+++ b/plugins/mod_register_ibr.lua
@@ -18,6 +18,10 @@ local additional_fields = module:get_option("additional_registration_fields", {}
local require_encryption = module:get_option_boolean("c2s_require_encryption",
module:get_option_boolean("require_encryption", false));
+pcall(function ()
+ module:depends("register_limits");
+end);
+
local account_details = module:open_store("account_details");
local field_map = {
diff --git a/plugins/mod_storage_memory.lua b/plugins/mod_storage_memory.lua
index 9659f9e7..ed04a5fb 100644
--- a/plugins/mod_storage_memory.lua
+++ b/plugins/mod_storage_memory.lua
@@ -197,6 +197,12 @@ function driver:open(store, typ) -- luacheck: ignore 212/self
return nil, "unsupported-store";
end
+function driver:purge(user) -- luacheck: ignore 212/self
+ for _, store in pairs(memory) do
+ store[user] = nil;
+ end
+end
+
if auto_purge_enabled then
module:hook("resource-unbind", function (event)
local user_bare_jid = event.session.username.."@"..event.session.host;