util.prosodyctl: Return success status of usermanager.create_user()
authorMatthew Wild <mwild1@gmail.com>
Tue, 5 May 2009 15:37:17 +0000 (16:37 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 5 May 2009 15:37:17 +0000 (16:37 +0100)
util/prosodyctl.lua

index 4c6b6ea40e4476c73cf21c4af8c31c9eff1e8856..3b523a786bd419800b9d261c05fcdf316f5baec6 100644 (file)
@@ -19,7 +19,10 @@ function adduser(params)
                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