There’s an issue with inviting users to groups when the user is already present in the system. gingerman reported that the invite process fails with an “email address is already present” error and the user isn’t added to the group. This is contrary to the expected behaviour where the user should be added to the group without re-sending the invite.
techAPJ mentioned that a security fix might have caused this regression. However, gingerman pointed out that the code causing the error was unchanged before and after the security fix.
tgxworld confirmed that this is a bug and provided a PR with two fixes: skipping invite creation and adding the user to editable groups during bulk invites, and preventing users from being added to non-editable groups. techAPJ acknowledged the fix and noted that individual invites via API or UI will still raise an error as expected.
tgxworld clarified that automatic group addition will only occur via bulk invites, not individual invites.
My question (in the first post of this topic) is more about invite/bulk invites scenarios where existing user are invited only to group (not about inviting to a topic/PM - which seems to be the security fix is largely about).
shouldn’t the existing user be added to the group (not topic/PM) before rejecting an invite creation - as per your earlier comments ?
Thanks. I think it is smart to check with @tgxworld ( although it appears that piece of code will not run if topic is not given - so it is a different scenario where the invite is for topic). It appears the required code to add the existing user to a group is not present (for non-topic usecase)
That is correct the error was being logged in a notification PM when bulk inviting an existing user, but (before the security fix) the user was indeed added to the specified group via this block of code.