"must approve users" notifications are incorrectly triggered by old users

I noticed the same behaviour and I think I found out why this happens (not why thoses users do not appear in the review queue but why they were not approved at all):

As I understand the code[1] when you enable ‘must_approve_users’, most users who were created before the setting was enabled should be approved:

This worked for most of my users, but some were not marked as approved.

Data Explorer Query
SELECT
  id as UserID, approved
FROM
  users
ORDER BY id
UserID Approved
1 true
3 true
8 true
10 false
11 false
12 false
13 true

When you look at the reviewables table you can notice that users with a user ID matching the target ID of a chat message were not approved.

Data Explorer Query
SELECT id, target_id, target_type
FROM reviewables
ORDER BY target_id
id target_id target_type
6 9 ChatMessage
7 10 ChatMessage
8 11 ChatMessage
9 12 ChatMessage
1 2901 Post
2 2909 Post
5 2991 Post

I think it’s a bug that users aren’t approved when there is a matching target ID that has a target type different than ‘user’.


  1. I have hardly any programming skills ↩︎

3 Likes