diff mod_invites_register/mod_invites_register.lua @ 4120:d3c7be9e36d9

mod_invites_register: Fix traceback on registration via other module (thanks franck)
author Kim Alvefur <zash@zash.se>
date Mon, 14 Sep 2020 15:55:29 +0200
parents d34572047488
children ee8e7f5196b4
line wrap: on
line diff
--- a/mod_invites_register/mod_invites_register.lua	Mon Sep 14 14:19:19 2020 +0100
+++ b/mod_invites_register/mod_invites_register.lua	Mon Sep 14 15:55:29 2020 +0200
@@ -90,7 +90,7 @@
 		event.reason = "Registration on this server is through invitation only";
 		return;
 	end
-	if validated_invite.additional_data and validated_invite.additional_data.allow_reset then
+	if validated_invite and validated_invite.additional_data and validated_invite.additional_data.allow_reset then
 		event.allow_reset = validated_invite.additional_data.allow_reset;
 	end
 end);