Diff

plugins/mod_register.lua @ 5637:991b47778bf3

mod_register: get_child_text()!
author Kim Alvefur <zash@zash.se>
date Tue, 28 May 2013 18:32:51 +0200
parent 5500:eeea0eb2602a
child 5707:36a289e9244c
child 7916:72b6d5ab4137
line wrap: on
line diff
--- a/plugins/mod_register.lua	Tue May 28 16:10:22 2013 +0100
+++ b/plugins/mod_register.lua	Tue May 28 18:32:51 2013 +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