Mercurial > prosody-modules
comparison mod_register_json/mod_register_json.lua @ 365:1d95b69c2c81
mod_register_json: Corrected typo.
| author | Marco Cirillo <maranda@lightwitch.org> |
|---|---|
| date | Tue, 12 Apr 2011 22:57:34 +0000 |
| parents | 1edd3f7c749c |
| children | 29a8828243ce |
comparison
equal
deleted
inserted
replaced
| 364:1edd3f7c749c | 365:1d95b69c2c81 |
|---|---|
| 92 end | 92 end |
| 93 | 93 |
| 94 -- We first check if the supplied username for registration is already there. | 94 -- We first check if the supplied username for registration is already there. |
| 95 if not usermanager.user_exists(req_body["username"], req_body["host"]) then | 95 if not usermanager.user_exists(req_body["username"], req_body["host"]) then |
| 96 usermanager.create_user(req_body["username"], req_body["password"], req_body["host"]); | 96 usermanager.create_user(req_body["username"], req_body["password"], req_body["host"]); |
| 97 module:log("debug", "%s registration data submission for %s is successful", user, req_body["user"]); | 97 module:log("debug", "%s registration data submission for %s is successful", user, req_body["username"]); |
| 98 return http_response(200, "Done."); | 98 return http_response(200, "Done."); |
| 99 else | 99 else |
| 100 module:log("debug", "%s registration data submission for %s failed (user already exists)", user, req_body["user"]); | 100 module:log("debug", "%s registration data submission for %s failed (user already exists)", user, req_body["username"]); |
| 101 return http_response(409, "User already exists."); | 101 return http_response(409, "User already exists."); |
| 102 end | 102 end |
| 103 end | 103 end |
| 104 end | 104 end |
| 105 end | 105 end |
