Invitation Links are Only Working for Non-existing Users & Breaking Our Current Implementation

Hi

Previously, this bug issue was reported (Logged in users have no way to navigate back after using a redeemed invitation link) and the problem was that existing users would no longer be able to access the ‘Arrive at topic’. This redirect issue has been fixed recently (thanks @lindsey and @zogstrip).

However, a new issue appeared along side the fix which is that existing users who use the link are no longer being added to the group specified in the ‘Add to groups’. This completely breaks our implementation of using invitation links for all our existing users because most importantly in addition to redirecting existing users to a topic, we use the ‘add to group’ to give them access to private categories along side using a webhook for external integrations (detailed use case explained here & here )




Dear Discourse Team (cc: @lindsey)
I urge you to have a look at this asap as this is affecting our implementation and it is quite urgent.
Thank you!


This is a bit of an odd path to take for existing users. Invites are geared towards new users. As an admin, why not add the existing users to the group directly?

Because we rely on them clicking on the invitation link and have been using the ‘Add to group’ feature. This also helped with the automation we’re using:

  1. Learner clicks on the link
  2. Existing or new, they’re added to a group and redirected to a topic post
  3. The topic post is in a private category which only people added to the group can view it (but now only new users can view these topics because [existing users] are no longer being added to the group hence the new changes)
  4. In some cases, when they’re added to the group (after clicking on the link) we have it connected to a webhook which grants a badge, or does other automations based on this step.

This has been working perfectly for us for about two and a half years.

1 Like

Hey @gassim , just checking in to let you know we’re still talking this through. I’ll have more info for you soon!

2 Likes

Hey @gassim , thanks for your patience while we’ve been looking into this. I’m afraid the short version of this is that your use case is not really part of our intended design for invites, and it would not be easy to adapt invites to support this.

As designed, invites are meant to guide new users through the registration process, not to change existing users. We did some digging and believe that we made a security fix back in 2022 that disabled the functionality you’re describing here for existing users using invite links.

Invites are a tricky area for us because there are lots of security implications, so reintroducing this functionality is not a simple undertaking for us. We would need to significantly refactor invites to effectively support your use case of using invites for new and existing users.

I understand that supporting your use case is important and this information is likely disappointing to you! However, I suspect that what you want could be accomplished through some other means. I would start with checking out Discourse Automation — we have some docs on how to add users to group automatically which might fit your needs: Adding users to groups through custom field automation

If you need more help along these lines, please open a Support or Feature topic and we can pick things up from there.

This topic was automatically closed after 2 days. New replies are no longer allowed.