How to auto remove from groups when trust level falls?

This might work in the rails console

./launcher enter app
rails c

Then, this:

User.where(manual_locked_trust_level: 3).update_all(manual_locked_trust_level: nil, trust_level: 1)

That will find all users locked to trust level 3, unlock their trust level and set their trust level to 1.