# HG changeset patch # User Matthew Wild # Date 1294161718 0 # Node ID 925a27f15a6054576c741c9456708054e8ab9d75 # Parent 73d570890a1bcefcc94521bbdce572d269f96775 mod_register: Small code cleanup diff -r 73d570890a1b -r 925a27f15a60 plugins/mod_register.lua --- a/plugins/mod_register.lua Tue Jan 04 17:19:39 2011 +0000 +++ b/plugins/mod_register.lua Tue Jan 04 17:21:58 2011 +0000 @@ -71,12 +71,9 @@ 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));