# HG changeset patch # User Kim Alvefur # Date 1744746433 -7200 # Node ID ecafafec7806f428df61cc02805a69776b741e92 # Parent 068e77bf91b9c8347cf22fbe6c693dc8638a8535 mod_invites: Consider password reset a distinct type wrt invite page This should prevent returning an invite web page unless it supports password resets. diff -r 068e77bf91b9 -r ecafafec7806 plugins/mod_invites.lua --- a/plugins/mod_invites.lua Wed Apr 16 12:02:31 2025 +0100 +++ b/plugins/mod_invites.lua Tue Apr 15 21:47:13 2025 +0200 @@ -221,7 +221,11 @@ -- Determine whether this type of invitation is supported by the landing page local invite_type; if invite.type == "register" then - invite_type = "account"; + if invite.additional_data and invite.additional_data.allow_reset then + invite_type = "password-reset"; + else + invite_type = "account"; + end elseif invite.type == "roster" then if invite.allow_registration then invite_type = "account-and-contact";