# HG changeset patch # User Kim Alvefur # Date 1491812885 -7200 # Node ID 8f5f197b139d8ec789f58a062b3b9d193e9927f8 # Parent 91550b6f93d20e636bd4196deb0f8eb086736c67 mod_register: Remove check for empty table (previous line sets a field) diff -r 91550b6f93d2 -r 8f5f197b139d plugins/mod_register.lua --- a/plugins/mod_register.lua Sat Apr 08 16:42:42 2017 +0200 +++ b/plugins/mod_register.lua Mon Apr 10 10:28:05 2017 +0200 @@ -268,7 +268,7 @@ 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);