From a9bc69ec0297052ca1609ad21d4cf920308f3452 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Tue, 29 Dec 2015 09:15:32 -0800 Subject: [PATCH] #29: Exclude null usernames from the account merging script. --- app/Console/Commands/MergeDuplicateAccounts.php | 1 + 1 file changed, 1 insertion(+) 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');