1a9953348c
This is a follow-on to https://github.com/go-gitea/gitea/pull/26550 and fixes the case where the team invite links to the registration page if it is disabled in settings.