Changeset

5925:9ed02a4f6ff4

mod_invites_tracking: Don't bother storing anything for non-invite IBR
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 May 2024 12:48:41 +0100
parents 5924:cb3b2fbf57e7
children 5926:8ff308fad9fd
files mod_invites_tracking/mod_invites_tracking.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites_tracking/mod_invites_tracking.lua	Wed May 08 12:48:24 2024 +0100
+++ b/mod_invites_tracking/mod_invites_tracking.lua	Wed May 08 12:48:41 2024 +0100
@@ -4,6 +4,11 @@
 	local validated_invite = event.validated_invite or (event.session and event.session.validated_invite);
 	local new_username = event.username;
 
+	if not validated_invite then
+		module:log("debug", "No invitation found for registration of %s", new_username);
+		return;
+	end
+
 	local invite_id = nil;
 	local invite_source = nil;
 	if validated_invite then