Skip to content

Commit

Permalink
Move to more performant query instead of array_filter #3286
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Oct 17, 2023
1 parent 8b07daf commit cff0b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/controllers/UpgradeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,9 @@ public function _migrateCustomers(): void
->leftJoin(['u' => $usersTable], 'o.email = u.email')
->where(['u.email' => null])
->andWhere(['not', ['o.email' => null]])
->andWhere(['not', ['o.email' => '']])
->groupBy(['[[o.email]]'])
->column();
$guestEmails = array_filter($guestEmails);
$this->stdoutlast(' Done. Found ' . count($guestEmails) . ' guest emails.', Console::FG_GREEN);

// We know we have to make a user for every guest email address
Expand Down

0 comments on commit cff0b7b

Please sign in to comment.