Mercurial > prosody-hg
comparison plugins/mod_user_account_management.lua @ 11120:b2331f3dfeea
Merge 0.11->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 30 Sep 2020 09:50:33 +0100 |
| parents | fcdc65bc6697 |
| children | 74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 11119:68df52bf08d5 | 11120:b2331f3dfeea |
|---|---|
| 51 end | 51 end |
| 52 | 52 |
| 53 log("info", "User removed their account: %s@%s", username, host); | 53 log("info", "User removed their account: %s@%s", username, host); |
| 54 module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); | 54 module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); |
| 55 else | 55 else |
| 56 local username = nodeprep(query:get_child_text("username")); | 56 local username = query:get_child_text("username"); |
| 57 local password = query:get_child_text("password"); | 57 local password = query:get_child_text("password"); |
| 58 if username and password then | 58 if username and password then |
| 59 username = nodeprep(username); | |
| 59 if username == session.username then | 60 if username == session.username then |
| 60 if usermanager_set_password(username, password, session.host, session.resource) then | 61 if usermanager_set_password(username, password, session.host, session.resource) then |
| 61 session.send(st.reply(stanza)); | 62 session.send(st.reply(stanza)); |
| 62 else | 63 else |
| 63 -- TODO unable to write file, file may be locked, etc, what's the correct error? | 64 -- TODO unable to write file, file may be locked, etc, what's the correct error? |
