Invite badges from inviting your self

Description and Evidence

Recently in 2.9.0beta2 users that already have an account can click invite links. But I generated invite links can click them it said I invited myself and because I am TL2+ and I clicked 5 different invite links of mine I received the Champion badge. You can see a screenshot below of it below. These are in the Replit EDU forums and you can view my profile here.

I also made an invite link on the Codecademy forums and it says I invited myself there also that you can see below. View my profile here.

Repro steps

Reach TL2+ (by default) make invite links that you then click. It will say that you invited yourself on your profile and that you accepted your invite as shown above. And if you enough invite links you will receive the Campaigner and Champion badges.


Works for me here too. Now my profile says I was invited by myself.


And you should receive the promoter badge. (Forgot to mention it in the original post because I already had it before this)

1 Like

Thanks for pointing this out! When designing this feature, I forgot to think like an evil person. :supervillain:

@dan any thoughts on how to fix this issue?


I personally never looked at the code for discourse but something like this might would work. (this is in JS because that’s what I know best)

if (invter != invitee) {

This bug is now fixed. Thanks again @not-ethan for reporting it! If you notice anything at all wrong with the invite system, do let us know. We’re actively working on it.


Reopening because I got a PM that I lost track of from @not-ethan. @dan if it’s not too much trouble would you mind assisting?

Can I have a link to the commit or PR for the fix? I’m just curious as to what the fix was


@tobiaseigen @dan think I found the PR FIX: Do not increase invite count for current user by udan11 · Pull Request #15952 · discourse/discourse · GitHub