aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-04 17:21:58 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-04 17:21:58 +0000
commitabd55f9e2c1c7972f8f25385fa07c8ac2ae0f4cf (patch)
tree586dba07e8069a9617e00de2a754b329c08311c2
parentad53448c47bcbcc3a2b7bdcef0b66ad133da87d2 (diff)
downloadprosody-abd55f9e2c1c7972f8f25385fa07c8ac2ae0f4cf.tar.gz
prosody-abd55f9e2c1c7972f8f25385fa07c8ac2ae0f4cf.zip
mod_register: Small code cleanup
-rw-r--r--plugins/mod_register.lua7
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));