Software / code / prosody
Comparison
plugins/mod_register.lua @ 7758:2b305ec8c146
Merge 0.10->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 02 Dec 2016 11:13:05 +0100 |
| parent | 7754:560d2e758d4c |
| child | 7812:2bc339352dcd |
comparison
equal
deleted
inserted
replaced
| 7747:0e442402cebc | 7758:2b305ec8c146 |
|---|---|
| 255 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); | 255 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); |
| 256 else | 256 else |
| 257 -- TODO unable to write file, file may be locked, etc, what's the correct error? | 257 -- TODO unable to write file, file may be locked, etc, what's the correct error? |
| 258 local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk."); | 258 local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk."); |
| 259 if usermanager_create_user(username, password, host) then | 259 if usermanager_create_user(username, password, host) then |
| 260 data.registered = os.time(); | |
| 260 if next(data) and not account_details:set(username, data) then | 261 if next(data) and not account_details:set(username, data) then |
| 261 log("debug", "Could not store extra details"); | 262 log("debug", "Could not store extra details"); |
| 262 usermanager_delete_user(username, host); | 263 usermanager_delete_user(username, host); |
| 263 session.send(error_reply); | 264 session.send(error_reply); |
| 264 return true; | 265 return true; |