util.prosodyctl: Return success status of usermanager.create_user()
authorMatthew Wild <mwild1@gmail.com>
Tue, 05 May 2009 16:37:17 +0100
changeset 1123 da7ff11a03ee
parent 1122 07b2b5942957
child 1124 055cfdc96afa
util.prosodyctl: Return success status of usermanager.create_user()
util/prosodyctl.lua
--- a/util/prosodyctl.lua	Tue May 05 16:25:13 2009 +0100
+++ b/util/prosodyctl.lua	Tue May 05 16:37:17 2009 +0100
@@ -19,7 +19,10 @@
 		return false, "invalid-hostname";
 	end
 	
-	usermanager.create_user(user, password, host);
+	local ok = usermanager.create_user(user, password, host);
+	if not ok then
+		return false, "unable-to-save-data";
+	end
 	return true;
 end