Review queue filled with "pending" users not clearing after disabling "must approve users" site setting

On v2.3.0.beta9 +10

I have about 12,000 items waiting in the review queue, all of which are users from a vbulletin import. When the data was imported about a month ago the review queue didn’t exist as discourse was a few versions behind.

Between importing and upgrading versions, must approve users in the site settings was enabled for testing the platform internally with my team. Eventually we turned this setting off before reopening to the public.

Problem: I have 12,000 imported users who “need review” when disabling the site setting should have dequeued them. Is there any way I can clear the queue en masse without having to redundantly approve them by hand?

2 Likes

I believe @eviltrout can advise you on this.

It depends if you want to keep the history around of the reviewable or not.

The nuclear option if you don’t care about history is to open a rails console and do this:

ReviewableUser.pending.delete_all

If you want to approve them you can do this:

ReviewableUser.pending.each { |r| r.perform(Discourse.system_user, :approve_user) }
6 Likes

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