Mercurial > prosody-hg
comparison plugins/mod_register.lua @ 5637:991b47778bf3
mod_register: get_child_text()!
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 28 May 2013 18:32:51 +0200 |
| parents | eeea0eb2602a |
| children | 36a289e9244c 72b6d5ab4137 |
comparison
equal
deleted
inserted
replaced
| 5636:d323932ecf18 | 5637:991b47778bf3 |
|---|---|
| 113 end | 113 end |
| 114 | 114 |
| 115 module:log("info", "User removed their account: %s@%s", username, host); | 115 module:log("info", "User removed their account: %s@%s", username, host); |
| 116 module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); | 116 module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); |
| 117 else | 117 else |
| 118 local username = nodeprep(query:get_child("username"):get_text()); | 118 local username = nodeprep(query:get_child_text("username")); |
| 119 local password = query:get_child("password"):get_text(); | 119 local password = query:get_child_text("password"); |
| 120 if username and password then | 120 if username and password then |
| 121 if username == session.username then | 121 if username == session.username then |
| 122 if usermanager_set_password(username, password, session.host) then | 122 if usermanager_set_password(username, password, session.host) then |
| 123 session.send(st.reply(stanza)); | 123 session.send(st.reply(stanza)); |
| 124 else | 124 else |
