aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_register.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-10 23:16:13 +0200
committerKim Alvefur <zash@zash.se>2017-04-10 23:16:13 +0200
commit61c1325aa6509896b202f731c546e980ef97fff4 (patch)
treee163b8572f88719bc01ba397d169da78c4fc8d48 /plugins/mod_register.lua
parentfcca450715b5ccb94002dc9dd2babfe214955f4b (diff)
parent1796c0795624152f8415ad64f9cdab62a9ad6402 (diff)
downloadprosody-61c1325aa6509896b202f731c546e980ef97fff4.tar.gz
prosody-61c1325aa6509896b202f731c546e980ef97fff4.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_register.lua')
-rw-r--r--plugins/mod_register.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index 72e91368..e999428d 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -255,7 +255,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event)
session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid."));
return true;
end
- local user = { username = username , host = host, allowed = true }
+ local user = { username = username , host = host, additional = data, allowed = true }
module:fire_event("user-registering", user);
if not user.allowed then
log("debug", "Registration disallowed by module");
@@ -268,7 +268,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event)
local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk.");
if usermanager_create_user(username, password, host) then
data.registered = os.time();
- if next(data) and not account_details:set(username, data) then
+ if not account_details:set(username, data) then
log("debug", "Could not store extra details");
usermanager_delete_user(username, host);
session.send(error_reply);