# Diverse vragen over het opschonen van een geïmporteerde vBulletin

**URL:** <https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643>\
**Category:** Product Support\
**Created:** [21 augustus 2020 om 09:29 UTC](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643 "2020-08-21T09:29:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [9 september 2020 om 20:42 UTC](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643/5 "2020-09-09T20:42:12Z")

</div>

For the record, here are my conditions:

In my case, a spammer must have:

- More than 1 post
- at least 1 titleless topic
- No titled topic
- The same number of posts as the number of topics (since a topic IS a post)

So I just added conditions:

```ruby
User.find_each do |user|
  untitled_topic_count = user.topics.where(title: "").count
  titled_topic_count = user.topics.where.not(title: "").count
  topic_count = untitled_topic_count + titled_topic_count
  post_count = user.posts.count
  if post_count > 1 && untitled_topic_count > 0 && titled_topic_count == 0 && post_count == topic_count
  	puts "SPAMMER ?"
  end
end

```

Let’s hope that won’t target legit users, but that _seems_ safe so far, looking randomly at targets. 😉

---

_[View the full topic](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643)._
