39 if not(provider) or provider.name == "null" then |
39 if not(provider) or provider.name == "null" then |
40 usermanager.initialize_host(host); |
40 usermanager.initialize_host(host); |
41 end |
41 end |
42 storagemanager.initialize_host(host); |
42 storagemanager.initialize_host(host); |
43 |
43 |
44 local ok = usermanager.create_user(user, password, host); |
44 local ok, errmsg = usermanager.create_user(user, password, host); |
45 if not ok then |
45 if not ok then |
46 return false, "unable-to-save-data"; |
46 return false, errmsg; |
47 end |
47 end |
48 return true; |
48 return true; |
49 end |
49 end |
50 |
50 |
51 function user_exists(params) |
51 function user_exists(params) |