# HG changeset patch # User Marco Cirillo # Date 1326577537 0 # Node ID 859bf77b9fbfbcdf951f3e08248d8c755496ca3b # Parent d8143f627f9f2fd22da0352bf4bbe268ddd5bfe7 mod_register_json: fire user-registered event manually on the destination host. (thanks Mr. Gecko) diff -r d8143f627f9f -r 859bf77b9fbf mod_register_json/mod_register_json.lua --- a/mod_register_json/mod_register_json.lua Sat Jan 14 19:56:24 2012 +0000 +++ b/mod_register_json/mod_register_json.lua Sat Jan 14 21:45:37 2012 +0000 @@ -97,7 +97,8 @@ return http_response(406, "Supplied username contains invalid characters, see RFC 6122.") else usermanager.create_user(username, req_body["password"], req_body["host"]) - module:log("debug", "%s registration data submission for %s is successful", user, username) + hosts[req_body["host"]].events.fire_event("user-registered", { username = username, host = req_body["host"], source = "mod_register_json", session = { ip = req_body["ip"] } }) + module:log("debug", "%s registration data submission for %s@%s is successful", user, username, req_body["host"]) return http_response(200, "Done.") end else