Comparison

plugins/mod_register.lua @ 8069:8f5f197b139d

mod_register: Remove check for empty table (previous line sets a field)
author Kim Alvefur <zash@zash.se>
date Mon, 10 Apr 2017 10:28:05 +0200
parent 7917:1ea3a8dc7dd5
child 8070:2db6746d2df8
comparison
equal deleted inserted replaced
8067:91550b6f93d2 8069:8f5f197b139d
266 else 266 else
267 -- TODO unable to write file, file may be locked, etc, what's the correct error? 267 -- TODO unable to write file, file may be locked, etc, what's the correct error?
268 local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk."); 268 local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk.");
269 if usermanager_create_user(username, password, host) then 269 if usermanager_create_user(username, password, host) then
270 data.registered = os.time(); 270 data.registered = os.time();
271 if next(data) and not account_details:set(username, data) then 271 if not account_details:set(username, data) then
272 log("debug", "Could not store extra details"); 272 log("debug", "Could not store extra details");
273 usermanager_delete_user(username, host); 273 usermanager_delete_user(username, host);
274 session.send(error_reply); 274 session.send(error_reply);
275 return true; 275 return true;
276 end 276 end