loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Team invite url fix when registration disabled (#26950)

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.

authored by

Jack Hay and committed by
GitHub
1a995334 30cea70d

+2 -2
+2 -2
services/mailer/mail_team_invite.go
··· 46 46 inviteRedirect := url.QueryEscape(fmt.Sprintf("/org/invite/%s", invite.Token)) 47 47 inviteURL := fmt.Sprintf("%suser/sign_up?redirect_to=%s", setting.AppURL, inviteRedirect) 48 48 49 - if err == nil && user != nil { 50 - // user account exists 49 + if (err == nil && user != nil) || setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration { 50 + // user account exists or registration disabled 51 51 inviteURL = fmt.Sprintf("%suser/login?redirect_to=%s", setting.AppURL, inviteRedirect) 52 52 } 53 53