Mercurial > prosody-hg
comparison plugins/mod_user_account_management.lua @ 10411:db2a06b9ff98
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 16 Nov 2019 16:52:31 +0100 |
| parents | fcdc65bc6697 |
| children | 74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 10410:659b577f280c | 10411:db2a06b9ff98 |
|---|---|
| 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? |
