#29: Exclude null usernames from the account merging script.

This commit is contained in:
Peter Deltchev 2015-12-29 09:15:32 -08:00
parent 622dc2d577
commit a9bc69ec02

View file

@ -73,6 +73,7 @@ class MergeDuplicateAccounts extends Command
$usernames = DB::table('users')
->select(['username', DB::raw('COUNT(*) as count')])
->whereNull('disabled_at')
->whereNotNull('username')
->groupBy(DB::raw('LOWER(username)'))
->having('count', '>=', 2)
->lists('username');