mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-03-29 22:37:46 +01:00
#29: Exclude null usernames from the account merging script.
This commit is contained in:
parent
622dc2d577
commit
a9bc69ec02
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ class MergeDuplicateAccounts extends Command
|
||||||
$usernames = DB::table('users')
|
$usernames = DB::table('users')
|
||||||
->select(['username', DB::raw('COUNT(*) as count')])
|
->select(['username', DB::raw('COUNT(*) as count')])
|
||||||
->whereNull('disabled_at')
|
->whereNull('disabled_at')
|
||||||
|
->whereNotNull('username')
|
||||||
->groupBy(DB::raw('LOWER(username)'))
|
->groupBy(DB::raw('LOWER(username)'))
|
||||||
->having('count', '>=', 2)
|
->having('count', '>=', 2)
|
||||||
->lists('username');
|
->lists('username');
|
||||||
|
|
Loading…
Add table
Reference in a new issue