diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-01-04 17:21:58 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-01-04 17:21:58 +0000 |
commit | 18e42c9e081d3405b90abea5176b803da9d6077b (patch) | |
tree | e387ce4c8d71a67b2dee02e347af868f373ca0f7 /plugins/mod_register.lua | |
parent | 55c8f50819e15b8a48194511c121420687a3942c (diff) | |
download | prosody-18e42c9e081d3405b90abea5176b803da9d6077b.tar.gz prosody-18e42c9e081d3405b90abea5176b803da9d6077b.zip |
mod_register: Small code cleanup
Diffstat (limited to 'plugins/mod_register.lua')
-rw-r--r-- | plugins/mod_register.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index 7373adad..25c09dfa 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -71,12 +71,9 @@ local function handle_registration_stanza(event) module:log("info", "User removed their account: %s@%s", username, host); module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); else - local username = query:child_with_name("username"); - local password = query:child_with_name("password"); + local username = nodeprep(query:get_child("username"):get_text()); + local password = query:get_child("password"):get_text(); if username and password then - -- FIXME shouldn't use table.concat - username = nodeprep(table.concat(username)); - password = table.concat(password); if username == session.username then if usermanager_set_password(username, password, session.host) then session.send(st.reply(stanza)); |