Software / code / prosody
Comparison
plugins/mod_register.lua @ 8192:4354f556c5db
core.usermanager, various modules: Disconnect other resources on password change (thanks waqas) (fixes #512)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 28 Jul 2017 13:15:29 +0200 |
| parent | 8183:49a682d6b427 |
| child | 8194:ba9cd8447578 |
comparison
equal
deleted
inserted
replaced
| 8191:d43012448c1f | 8192:4354f556c5db |
|---|---|
| 128 else | 128 else |
| 129 local username = nodeprep(query:get_child_text("username")); | 129 local username = nodeprep(query:get_child_text("username")); |
| 130 local password = query:get_child_text("password"); | 130 local password = query:get_child_text("password"); |
| 131 if username and password then | 131 if username and password then |
| 132 if username == session.username then | 132 if username == session.username then |
| 133 if usermanager_set_password(username, password, session.host) then | 133 if usermanager_set_password(username, password, session.host, session.resource) then |
| 134 session.send(st.reply(stanza)); | 134 session.send(st.reply(stanza)); |
| 135 else | 135 else |
| 136 -- TODO unable to write file, file may be locked, etc, what's the correct error? | 136 -- TODO unable to write file, file may be locked, etc, what's the correct error? |
| 137 session.send(st.error_reply(stanza, "wait", "internal-server-error")); | 137 session.send(st.error_reply(stanza, "wait", "internal-server-error")); |
| 138 end | 138 end |