# Gli utenti esistenti non vengono aggiunti ai gruppi in un invito se possono già accedere all'argomento a cui l'invito indirizza

**URL:** https://meta.discourse.org/t/existing-users-dont-get-added-to-groups-in-an-invite-if-they-can-already-access-the-topic-the-invite-directs-to/365406
**Category:** Bug
**Tags:** groups, invites, fixed
**Created:** [9 Maggio 2025, 1:47am UTC](https://meta.discourse.org/t/existing-users-dont-get-added-to-groups-in-an-invite-if-they-can-already-access-the-topic-the-invite-directs-to/365406 "2025-05-09T01:47:11Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![pento](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pento/32/450661_2.png) [@pento](https://meta.discourse.org/u/pento)
#### Post date: [16 Maggio 2025, 6:46am UTC](https://meta.discourse.org/t/existing-users-dont-get-added-to-groups-in-an-invite-if-they-can-already-access-the-topic-the-invite-directs-to/365406/6 "2025-05-16T06:46:26Z")

</div>

Grazie per la segnalazione del bug, @nathank!

Ho appena unito una correzione per questo:

> <https://github.com/discourse/discourse/pull/32762>
>
> \## ✨ What's This?
> 
> This is a tweak to the change in #31301.
> 
> That change all…owed existing users to be redirected to a topic that they already have access to by bypassing the invite acceptance step, and simply redirecting them there. Since some invites also add the invited user to one or more groups as well, this was causing the group adding step to be skipped in existing workflows.
> 
> This change addresses the issue by checking to see if the user would be added to any groups before redirecting. To avoid introducing a CSRF issue, it works by forcing the user through the normal invite acceptance flow, ensure there's user interaction before being added to any groups.
> 
> This change also tweaks the behaviour of #31301 to not follow redirects of expired invitations.
> 
> \## 👑 Testing
> 
> \### Basic functionality
> 
> 1. Create a test user.
> 2. Create an invite that lands on a topic that the test user can access already.
> 3. Add a group to the invite (which the test user isn’t currently a member of).
> 4. Login as the test user.
> 5. Visit the invite link with that user.
> 
> \### Variations
> 
> 1. Add the test user to the group before they visit the link.
> 2. Add multiple groups to the invite, of which the test user is a member of some, or all.

Fammi sapere se questo risolve il problema per te, o se riscontri ulteriori problemi!

---

_[View the full topic](https://meta.discourse.org/t/existing-users-dont-get-added-to-groups-in-an-invite-if-they-can-already-access-the-topic-the-invite-directs-to/365406)._
