# User stuck in 'staged' status

**URL:** https://meta.discourse.org/t/user-stuck-in-staged-status/41594
**Category:** Bug
**Created:** [2016年三月26日 06:01 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594 "2016-03-26T06:01:41Z")
**Posts on this page:** 9
**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: [2016年三月26日 06:01 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/1 "2016-03-26T06:01:41Z")

</div>

I have a user whose account was originally created as a staged account via an import from another system.

Recently, they logged in and created a new topic.

But they still show up as a staged user, and I cannot `@mention` them.

I do not see any way in the Admin UI to force them to become “unstaged”.

Potentially relevant site settings:

1. Google Login enabled
2. Local logins disabled
3. Email whitelist domains (1)

Currently running version v1.5.0.beta13b +38 (67a5fc39ded9f661974b6e06b109c75b50d3a1b1)

---

<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: [2016年三月26日 06:13 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/2 "2016-03-26T06:13:17Z")

</div>

Can’t you delete the staged account? Sounds like the emails don’t match?

---

<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: [2016年三月26日 06:16 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/3 "2016-03-26T06:16:07Z")

</div>

As far as I can tell there is only a single account for this user with that one email address.

On their user page in the Admin section, the “Email” field value matches the address in the “Logins” filed

eg:

Email: [foo@example.com](mailto:foo@example.com)  
Logins: Google([foo@example.com](mailto:foo@example.com))

---

<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: [2016年三月26日 06:34 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/4 "2016-03-26T06:34:50Z")

</div>

I think @zogstrip will need to have a look

---

<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: [2016年三月26日 06:40 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/5 "2016-03-26T06:40:11Z")

</div>

@zogstrip feel free to reach out here or via PM if you want more details that I can help get via logs or db queries, etc.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年三月29日 08:07 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/6 "2016-03-29T08:07:02Z")

</div>

I’ll have to try login in using the same email address using OAuth, but in the meantime, you can fix it with

```plaintext
cd /var/discourse
./launcher c app
User.where(email: "foo@example.com").update_all(staged: false)

```

---

<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: [2016年三月29日 14:35 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/7 "2016-03-29T14:35:51Z")

</div>

Thanks, I have found other users in this state, so I’ll use this workaround for now…

Here’s what I’m doing to catch them all periodically:

```ruby
User.where.not(previous_visit_at: nil).where(staged: true).update_all(staged: false)

```

This time it updated 29 users…

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年四月4日 17:05 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/8 "2016-04-04T17:05:08Z")

</div>

Just pushed a fix 🍌

[https://github.com/discourse/discourse/commit/841f36b0589d9e5aa0bbfcd328b0c3a2d7f795b0](https://github.com/discourse/discourse/commit/841f36b0589d9e5aa0bbfcd328b0c3a2d7f795b0)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年四月5日 05:05 UTC](https://meta.discourse.org/t/user-stuck-in-staged-status/41594/9 "2016-04-05T05:05:18Z")

</div>

This topic was automatically closed after 12 hours. New replies are no longer allowed.
