diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-10 23:16:13 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-10 23:16:13 +0200 |
commit | 8a9dd05b08a3a85b84680547e9b0f2027499fd37 (patch) | |
tree | e163b8572f88719bc01ba397d169da78c4fc8d48 /plugins/mod_register.lua | |
parent | f01822fbfc55fa0cdde361c179f02b044ceb7bcf (diff) | |
parent | 91baabfede04fcead2849a35d71a706c9042d074 (diff) | |
download | prosody-8a9dd05b08a3a85b84680547e9b0f2027499fd37.tar.gz prosody-8a9dd05b08a3a85b84680547e9b0f2027499fd37.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_register.lua')
-rw-r--r-- | plugins/mod_register.lua | 4 |
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); |