# Inviting users with groups field failed when there is an existing user in the list

**URL:** <https://meta.discourse.org/t/inviting-users-with-groups-field-failed-when-there-is-an-existing-user-in-the-list/109990>\
**Category:** Bug\
**Created:** [2월 25, 2019, 3:32오전 UTC](https://meta.discourse.org/t/inviting-users-with-groups-field-failed-when-there-is-an-existing-user-in-the-list/109990 "2019-02-25T03:32:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![gingerman](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@gingerman](https://meta.discourse.org/u/gingerman)\
**Post date:** [3월 4, 2019, 3:29오후 UTC](https://meta.discourse.org/t/inviting-users-with-groups-field-failed-when-there-is-an-existing-user-in-the-list/109990/4 "2019-03-04T15:29:01Z")

</div>

@techAPJ Just to clarify,

- [discourse/app/models/invite.rb at ab2c2ea60543f70621f930122b641e38e6913e06 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/ab2c2ea60543f70621f930122b641e38e6913e06/app/models/invite.rb#L92-L98) - This seems to be the piece of code which throws the error when there is an existing user with a given email address already present in the system. This code is same before & after the security fix commit (mentioned by you)

- 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 ?

---

_[View the full topic](https://meta.discourse.org/t/inviting-users-with-groups-field-failed-when-there-is-an-existing-user-in-the-list/109990)._
