From 18e42c9e081d3405b90abea5176b803da9d6077b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 4 Jan 2011 17:21:58 +0000 Subject: mod_register: Small code cleanup --- plugins/mod_register.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins') 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)); -- cgit v1.2.3