Changeset

4063:925a27f15a60

mod_register: Small code cleanup
author Matthew Wild <mwild1@gmail.com>
date Tue, 04 Jan 2011 17:21:58 +0000
parents 4062:73d570890a1b
children 4064:902f2ac67483
files plugins/mod_register.lua
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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));