Existing users don't get added to groups in an invite if they can already access the Topic the invite directs to

Discovered this bug when trying to do some fancy invites that add a user to a couple of groups and direct them to a topic, which would apply nicely across logged in, non-logged in, and new users.

To repro:

  1. Create an invite that lands on a topic that your test user can access already
  2. Add a group to the invite (which your user isn’t currently a member of)
  3. Login as your test user
  4. Visit the invite link with that user

Result: The test user is NOT added to the group (they should be).

If the user doesn’t already have access to that topic (or is a new user), they are added to the group(s) with no issues.

5 Likes

Thanks for reporting this! Sounds like an interesting one - will investigate and fix this up as soon as possible :slight_smile:

2 Likes

This reminds me of the other recent topics about inviting existing users to groups:

Maybe this report that the invite link to the user-testers group no longer works is also related: Join the Discourse User Testing Community - #29 by jordan-violet

2 Likes

Agree - I think that I’ve pinned it down a little more though. This functionality used to work, so this seems like a regression. Probably at the time of the fix alluded to in those other threads.

It would likely be appropriate to merge them all together.

Personally I believe this to be a highly valid use case. It permits the use of a single streamlined process to onboard people regardless of whether they are already on the site. Otherwise you need two parallel (and difficult to administer) processes for current and new users.

7 Likes

Thanks for the bug report, @nathank!

I’ve just merged a fix for this:

Let me know if this fixes the issue for you, or if you run into any further problems!

4 Likes

It sounds like you’ve nailed the problem beautifully! I think that we can tag this fixed

I’ve had to go with a simpler workflow for the current event that the invites are for, but look forward to trying this out properly soon.

4 Likes

It may also be worth a ping to @gassim and @UnicornX as well to see if this has solved it for their use cases, and round out those topics too. :crossed_fingers:

I’m getting an ‘invite expired’ on the one in Join the Discourse User Testing Community, which is encouraging as that sounds like it would work again if the invite redemption was extended. (Though that might also be because I already used it ages ago and forgot about it :slight_smile:)

4 Likes

Thanks a lot JammyDodger, moin, nathank, and pento! This is exactly what I was requesting in the post Invitation Links are Only Working for Non-existing Users & Breaking Our Current Implementation

Thanks Pento for the fix …

I’m hoping this is a permanent fix? (cc: @lindsey , @pmusaraj.)

Thanks!

4 Likes

Thanks for pointing that one out, I’ve created a new link without an expiration date. :slight_smile:

3 Likes

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