# Invite link should not auto-accept invitation if user is already logged in

**URL:** https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529
**Category:** Feature
**Created:** [13 בפברואר,‏ 2016,‏ 1:32pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529 "2016-02-13T13:32:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [13 בפברואר,‏ 2016,‏ 1:32pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/1 "2016-02-13T13:32:29Z")

</div>

I’ve been using the [Copy Invite Link](https://meta.discourse.org/t/copy-invite-link-link/32648) features for invites primarily because I find it a lot more natural to personally craft a message to people who I am inviting to a topic (especially people who are not yet users).

Recently, I was typing up an email and when I added the link, I was kindly prompted by Gmail to test the URL:

 ![](https://global.discourse-cdn.com/meta/original/3X/b/d/bdc21d2184566aa7d13b75fedb5455aadf266524.png)

The dialog in Discourse states that the “Invite link is only valid for this email address”:

[![](https://global.discourse-cdn.com/meta/original/3X/7/d/7d1d54bae9e9c9b2cdc9714b3381603cc0ad352e.png) ](https://global.discourse-cdn.com/meta/original/3X/7/d/7d1d54bae9e9c9b2cdc9714b3381603cc0ad352e.png)

Unfortunately, after clicking it, even though I was already logged in as myself, it appeared to immediately accept the invitation.

If a user is already logged in who is not the one who created the invite it could instead display a warning dialog saying something to the effect of “oops, looks like you are attempting to accept an invitation for another user. If you are not [logged in user], please log out and try again?”

---

<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: [13 בפברואר,‏ 2016,‏ 8:30pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/2 "2016-02-13T20:30:14Z")

</div>

Sure @techapj can you add this to your 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: [23 בפברואר,‏ 2016,‏ 2:22pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/3 "2016-02-23T14:22:17Z")

</div>

Okay, done via:

[https://github.com/discourse/discourse/commit/1253afdf959051b84d15d37e133dc7875ef520cb](https://github.com/discourse/discourse/commit/1253afdf959051b84d15d37e133dc7875ef520cb)

* * *

 ![](https://global.discourse-cdn.com/meta/original/3X/2/2/2246ab88d3c129080141a9ac4dce059da05b588c.png)

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [23 בפברואר,‏ 2016,‏ 2:24pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/4 "2016-02-23T14:24:49Z")

</div>

👍 Small nitpick. Seems like that `?` at the end be a `.` instead.

---

<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: [23 בפברואר,‏ 2016,‏ 4:27pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/5 "2016-02-23T16:27:03Z")

</div>

> [@mcwumbly](#):
>
> Seems like that ? at the end be a . instead.

[https://github.com/discourse/discourse/commit/72784d23e7e0c4950b01cf31189bea2337b6118f](https://github.com/discourse/discourse/commit/72784d23e7e0c4950b01cf31189bea2337b6118f)

---

<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: [23 בפברואר,‏ 2016,‏ 4:27pm UTC](https://meta.discourse.org/t/invite-link-should-not-auto-accept-invitation-if-user-is-already-logged-in/39529/6 "2016-02-23T16:27:06Z")

</div>


