# Bug in inviting users (?) Cannot login, claiming activation already sent (false)

**URL:** https://meta.discourse.org/t/bug-in-inviting-users-cannot-login-claiming-activation-already-sent-false/59357
**Category:** Bug
**Created:** [17 Marzo 2017, 3:32pm UTC](https://meta.discourse.org/t/bug-in-inviting-users-cannot-login-claiming-activation-already-sent-false/59357 "2017-03-17T15:32:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [17 Marzo 2017, 3:32pm UTC](https://meta.discourse.org/t/bug-in-inviting-users-cannot-login-claiming-activation-already-sent-false/59357/1 "2017-03-17T15:32:22Z")

</div>

Just installed from docker the latest 1.8.0.beta7. I think I stumbled upon a bug. Here’s what I did:

1. checked `login required` in Settings (it’s a closed discussion forum)
2. sent invite to a user

- user got the invite and clicks the link
- user got to the page asking for their username and **optional** password
- user fills in both fields and clicks “accept invitation”
- the interface logs them in automatically (no further emails are sent)
- user logs out
- user tries to log back in, but now interface says:  
` You can't log in yet. We previously sent an activation email to you at user@domain.com. Please follow the instructions in that email to activate your account. Click here to send the activation email again.`
- this is false, an activation email was **not** sent

1. user clicks on “here” to resend activation email

- interface then says:  
`Sorry, this account has already been activated.`
- which is true, but it is **not approved** , here’s what the Admin \> Users panel shows for their account:  
[![https://gyazo.com/e26ab0f2e831fed71834d9a70c731ddc](https://global.discourse-cdn.com/meta/original/3X/a/f/aff4f4f740dde81c76274f64593b4f1ff727bd8d.png)](https://gyazo.com/e26ab0f2e831fed71834d9a70c731ddc)
- user is stuck and can no longer login

### However!

If the user does **not** fill in the password at step 5. above, then an activation email is actually sent, and the user can properly activate the account and login. But this is cumbersome and impractical as I would need to warn all users in advance…

This must be a bug, right?

I tried quite a few combinations in Settings. This happens whether or not `invite only` is checked. Here are the relevant Login settings:

[![https://gyazo.com/3b82259df2f089ea6db001185e868dbf](https://global.discourse-cdn.com/meta/original/3X/3/9/397e3af1ae05b034eee3f6ebb2dbe391119af9cc.png)](https://gyazo.com/3b82259df2f089ea6db001185e868dbf)

---

<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: [20 Marzo 2017, 11:56am UTC](https://meta.discourse.org/t/bug-in-inviting-users-cannot-login-claiming-activation-already-sent-false/59357/4 "2017-03-20T11:56:26Z")

</div>

This is now fixed via:

[https://github.com/discourse/discourse/commit/521c88fe58af5b264d04e349d5a41e5a776b4611](https://github.com/discourse/discourse/commit/521c88fe58af5b264d04e349d5a41e5a776b4611)

Invited user will now receive a “Confirm your account” email if they set password while accepting the invite. This is done to validate their email address (in case the invite link was copied and handed over directly).

> [@nordize](#):
>
> user clicks on “here” to resend activation email
> 
> interface then says: Sorry, this account has already been activated.

This is a separate issue and I just opened a PR that fixes it:

[https://github.com/discourse/discourse/pull/4767](https://github.com/discourse/discourse/pull/4767)

Thanks for detailed repro steps @nordize 👍

---

<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: [20 Marzo 2017, 8:00pm UTC](https://meta.discourse.org/t/bug-in-inviting-users-cannot-login-claiming-activation-already-sent-false/59357/5 "2017-03-20T20:00:52Z")

</div>


