diff --git a/app/Console/Commands/MergeDuplicateAccounts.php b/app/Console/Commands/MergeDuplicateAccounts.php index 9fb9c9bc..29136c01 100644 --- a/app/Console/Commands/MergeDuplicateAccounts.php +++ b/app/Console/Commands/MergeDuplicateAccounts.php @@ -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');