mod_register: get_child_text! (thanks Lloyd)
authorKim Alvefur <zash@zash.se>
Thu, 03 Jul 2014 17:53:24 +0200
changeset 6297 5b298a6ecf0c
parent 6288 d122420542fb
child 6298 6ddd7913913b
child 6309 b6f76a52eb36
mod_register: get_child_text! (thanks Lloyd)
plugins/mod_register.lua
--- a/plugins/mod_register.lua	Mon Jun 30 12:45:53 2014 +0200
+++ b/plugins/mod_register.lua	Thu Jul 03 17:53:24 2014 +0200
@@ -115,8 +115,8 @@
 			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 = nodeprep(query:get_child("username"):get_text());
-			local password = query:get_child("password"):get_text();
+			local username = nodeprep(query:get_child_text("username"));
+			local password = query:get_child_text("password");
 			if username and password then
 				if username == session.username then
 					if usermanager_set_password(username, password, session.host) then