Changeset

8070:2db6746d2df8

mod_register: Include additional data in user-registering event
author Kim Alvefur <zash@zash.se>
date Mon, 10 Apr 2017 10:30:31 +0200
parents 8069:8f5f197b139d
children 8071:c3790ca4144f
files plugins/mod_register.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_register.lua	Mon Apr 10 10:28:05 2017 +0200
+++ b/plugins/mod_register.lua	Mon Apr 10 10:30:31 2017 +0200
@@ -255,7 +255,7 @@
 						session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid."));
 						return true;
 					end
-					local user = { username = username , host = host, allowed = true }
+					local user = { username = username , host = host, additional = data, allowed = true }
 					module:fire_event("user-registering", user);
 					if not user.allowed then
 						log("debug", "Registration disallowed by module");