Software /
code /
prosody-modules
Changeset
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 |
parents | 3479:9ef309fb501d |
children | 3481:1c8612d8db55 |
files | mod_invite/mod_invite.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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