Comparison

util/prosodyctl.lua @ 1123:da7ff11a03ee

util.prosodyctl: Return success status of usermanager.create_user()
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 May 2009 16:37:17 +0100
parent 1087:5e9475bec571
child 1130:442c87de8e2d
comparison
equal deleted inserted replaced
1122:07b2b5942957 1123:da7ff11a03ee
17 return false, "invalid-username"; 17 return false, "invalid-username";
18 elseif not host then 18 elseif not host then
19 return false, "invalid-hostname"; 19 return false, "invalid-hostname";
20 end 20 end
21 21
22 usermanager.create_user(user, password, host); 22 local ok = usermanager.create_user(user, password, host);
23 if not ok then
24 return false, "unable-to-save-data";
25 end
23 return true; 26 return true;
24 end 27 end
25 28
26 function user_exists(params) 29 function user_exists(params)
27 return usermanager.user_exists(params.user, params.host); 30 return usermanager.user_exists(params.user, params.host);