Data Explorer Query: trust_level_locked returns "true" when unlocked

(Southpaw) #1

This is my query:

SELECT username, trust_level, last_seen_at from users 
WHERE trust_level_locked = true AND trust_level != 4

GROUP BY users.trust_level, users.last_seen_at, users.username
ORDER BY trust_level asc

It returns a list among which, 821 TL1s. < groan >
If I understand correctly, that’s because we assign customers to TL1 even if they haven’t earned it, so there’s some sort of auto-lock going on.

So I start working my way through the list to unlock them.
I unlock several and re-run the query.

Everyone I’ve unlocked still shows up on the query results. I’ve double-checked, each profile in admin/users/ is unlocked.


How do I write a query that will show me only those users whose trust level is currently locked?

(Vinoth Kannan) #9

Hi Southpaw,

Very sorry for the super delayed reply. I think one of our engineers manually solved the problem in your site and forgot to update the details here.

trust_level_locked column is now replaced with manual_locked_trust_level and group_locked_trust_level columns. So you have to change your SQL query according to that like below.

SELECT username, trust_level, last_seen_at from users 
WHERE manual_locked_trust_level IS NOT NULL AND trust_level != 4

ORDER BY trust_level asc

(Southpaw) #10

Thank you. Sorry I didn’t see this response sooner!