So many broken users due to corrupt database

Sounds like a corrupt database index. REINDEX TABLE users should solve the problem.