From 2892837fbf98397152ccff54666d3bae477ac7b4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 10 Apr 2017 10:28:05 +0200 Subject: mod_register: Remove check for empty table (previous line sets a field) --- plugins/mod_register.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index 72e91368..58aa1536 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -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); -- cgit v1.2.3