Diff

mod_invite/mod_invite.lua @ 3480:5911030a1a66

mod_invite: Fire event that signals that an user has registered (thanks jeybe) This allows other modules to see this and do things, eg mod_watchregistrations
author Kim Alvefur <zash@zash.se>
date Thu, 07 Mar 2019 22:36:30 +0100
parent 2616:c814c667d4d1
child 3549:b059a3fb2a58
line wrap: on
line diff
--- a/mod_invite/mod_invite.lua	Wed Mar 06 21:51:45 2019 +0100
+++ b/mod_invite/mod_invite.lua	Thu Mar 07 22:36:30 2019 +0100
@@ -109,6 +109,9 @@
 
 		invite_storage:set(nil, tokens);
 
+		module:fire_event("user-registered", {
+			username = prepped_username, host = module.host, source = "mod_invite", });
+
 		return apply_template(template, { classes = "alert-success",
 			message = "Your account has been created! You can now log in using an XMPP client." })
 	else