# Handling invitations which match current accounts

**URL:** https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567
**Category:** Support
**Created:** [2월 23, 2015, 1:57오후 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567 "2015-02-23T13:57:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [2월 23, 2015, 1:57오후 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/1 "2015-02-23T13:57:54Z")

</div>

I’m not entirely sure how it happened, but I have a number of invitations which are outstanding, but match the email address of an active user.

I imagine it could be:

- I invite someone
- they register for access on their own
- an admin on our site approves them, and either
- It was me, and I don’t go cross check my invite list
- It was another admin on our site, who can’t see my outstanding invites
- I’m left with a stale invite, causing confusion when I re-send it.

I doubt it can be prevented, but it would be nice if the ones were highlighted so I knew to remove the unneeded invites.

Or maybe they could be auto-removed if a new account is created, and it matches anyone’s outstanding invite?

Thanks!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2월 24, 2015, 12:23오전 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/2 "2015-02-24T00:23:00Z")

</div>

Not sure exactly what happens in this case, I suspect it might work fine, can you check @techapj and report back?

1. Invitation is sent to `name@example.com`
2. User independently registers a new account at `name@example.com`
3. Invitation link is clicked by the user

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [2월 24, 2015, 12:50오전 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/3 "2015-02-24T00:50:34Z")

</div>

Ideally, the registration at step 2 would consume the invitation from #1, with the following two benefits:

- I no longer have the pending invite, to manage.
- The user is automatically approved into my otherwise closed forum.

and in the case of step 3, it’d be whatever currently happens if they click a consumed invite now.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2월 24, 2015, 12:51오전 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/4 "2015-02-24T00:51:13Z")

</div>

Yes that is what I hope happens. @techapj can confirm.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2월 24, 2015, 1:56오후 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/5 "2015-02-24T13:56:06Z")

</div>

> [@watchmanmonitor](#):
>
> the registration at step 2 would consume the invitation from #1

I just tested this locally and found out that this was happening for me. Then I enabled the setting `must approve users` and tested again, and the invitation was not redeemed.

So the invitation is not getting redeemed when the site setting `must approve users` is enabled. Added this on my to-do list.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3월 30, 2016, 3:14오후 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/6 "2016-03-30T15:14:38Z")

</div>

This issue was fixed via:

[https://github.com/discourse/discourse/commit/03665e8466bba6a2370089a943cd70ad278827c3](https://github.com/discourse/discourse/commit/03665e8466bba6a2370089a943cd70ad278827c3)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3월 30, 2016, 3:14오후 UTC](https://meta.discourse.org/t/handling-invitations-which-match-current-accounts/25567/7 "2016-03-30T15:14:43Z")

</div>


