# Imported users marked as suspect

**URL:** https://meta.discourse.org/t/imported-users-marked-as-suspect/144071
**Category:** Support
**Created:** [March 12, 2020, 2:51pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071 "2020-03-12T14:51:48Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![J5lx](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@J5lx](https://meta.discourse.org/u/J5lx)
#### Post date: [March 12, 2020, 2:51pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/1 "2020-03-12T14:51:48Z")

</div>

I operate a forum that was migrated from bbPress to Discourse about two years ago, and since the last update a few hours ago I’ve noticed a lot of users getting flagged as suspect all of a sudden. They are all users who were imported from the old bbPress forum and haven’t logged in since. I’ve investigated a little and I feel like this change might be the culprit:

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

I believe those users are being flagged because they have their website / bio set and they have only posted once (which means that, because they were imported, their posts read count is also only one).

Because of the nature of our community, and because it has existed for several years before we switched to Discourse, we have a bunch of those users who are now piling up in the review queue. Is there any way to avoid flagging these as suspect without ignoring _actually_ suspect users as well? Perhaps based on other side effects of the import, such as the fact that their IP address fields are empty or that the “Days visited field” is 0 while “Posts read” is 1?

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [March 12, 2020, 3:00pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/2 "2020-03-12T15:00:48Z")

</div>

> [@J5lx](#):
>
> Is there any way to avoid flagging these as suspect without ignoring _actually_ suspect users as well?

This is not possible right now, sorry.

We only queue 10 of these users every two hours to avoid flooding the review queue. If you want to disable the feature, you can turn the `approve_suspect_users` setting off.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 12, 2020, 3:24pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/3 "2020-03-12T15:24:07Z")

</div>

> [@J5lx](#):
>
> I believe those users are being flagged because they have their website / bio set and they have only posted once (which means that, because they were imported, their posts read count is also only one).

You should be able to fix this up at the rails console. I’m not sure exactly what to do, but maybe just clear the bio of users who haven’t logged in for over a year. Or, set the read count to those people to 100 or something like that.

---

<div class="post-metadata">

### Author: ![J5lx](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@J5lx](https://meta.discourse.org/u/J5lx)
#### Post date: [March 13, 2020, 1:15pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/4 "2020-03-13T13:15:44Z")

</div>

Alright. Not quite what I was hoping for, but I guess there’s no better way then. Thanks for replying so quickly!

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [March 14, 2020, 12:48pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/5 "2020-03-14T12:48:58Z")

</div>

We discussed this internally and did some changes to reduce the number of flagged users:

[https://review.discourse.org/t/fix-ignore-suspect-users-that-were-migrated-or-users-who-were-created-more-than-six-months-ago-9205/9844](https://review.discourse.org/t/fix-ignore-suspect-users-that-were-migrated-or-users-who-were-created-more-than-six-months-ago-9205/9844)

We now skip users created more than six months ago, or as a result of a migration.

---

<div class="post-metadata">

### Author: ![J5lx](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@J5lx](https://meta.discourse.org/u/J5lx)
#### Post date: [March 14, 2020, 4:02pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/6 "2020-03-14T16:02:35Z")

</div>

Wow, thanks a lot for that!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 23, 2020, 3:30pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/7 "2020-03-23T15:30:05Z")

</div>

I have a site that is running [Commits · discourse/discourse · GitHub](https://github.com/discourse/discourse/commits/0cd502a55838d5d27f96f13c0794f3669ac41fcc) and has marked hundreds of imported users as suspect, sending out lots of emails to unsuspecting moderators (who don’t know about the migration yet).

Also, `approve suspect users` is not set, so I don’t understand why these imported users would be in the review queue anyway.

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [March 23, 2020, 3:46pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/8 "2020-03-23T15:46:36Z")

</div>

There’s only one way to queue suspect users, and it checks that the setting is enabled before doing anything.

> [@pfaffman](#):
>
> Also, `approve suspect users` is not set, so I don’t understand why these imported users would be in the review queue anyway.

Are you sure the setting is not enabled? We changed the default to true. Also, these users should be skipped if they have a custom field called `import_id`

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 23, 2020, 3:53pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/9 "2020-03-23T15:53:11Z")

</div>

Thanks, Roman. My current best guess is that this import ran on a version of Discourse after the approve suspect users feature was added and before the fix was applied.

Would it make sense that if the import ran on one of those versions of Discourse and then was restored to a version that has the fix, those users would still be marked as suspect and moderators would get the “these items are in the queue for X days” message? And, if that’s the case, can you tell me how to mark them as approved all from the UX or Rails (or even just point me to the model and I can figure it out).

Maybe `ReviewableUser.all.destroy_all`?

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [March 23, 2020, 4:27pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/10 "2020-03-23T16:27:29Z")

</div>

Personally, I’m not a fan of destroying everything. Take a look at this migration:

> <https://github.com/discourse/discourse/blob/b9aaa9718df45fc41aafccc3f7dc47ac7e3126a3/db/migrate/20200311135425_clear_approved_users_from_the_review_queue.rb>

If you want to approve every flagged user, remove the `u.approved = true` condition.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 23, 2020, 4:32pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/11 "2020-03-23T16:32:17Z")

</div>

I was going to be satisfied with a hammer and you provided a scalpel (my job was made harder because I don’t have console access to the server where that import is right now and I’ve started a new import on my server). Thanks a million!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 22, 2020, 4:32pm UTC](https://meta.discourse.org/t/imported-users-marked-as-suspect/144071/12 "2020-04-22T16:32:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
