Skip to content

Commit

Permalink
#3286 prevent duplicate inactive users being created during upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Oct 13, 2023
1 parent 8ff5dd5 commit fb9d51b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixed a bug where the delete button would be shown for users that do not have permission to delete on the Product edit page. ([#3285](https://github.com/craftcms/commerce/issues/3285))
- Fixed a bug where deleted shipping categories were still available for selection. ([#3272](https://github.com/craftcms/commerce/issues/3272))
- Fixed an error that could occur when rendering a PDF. ([#2633](https://github.com/craftcms/commerce/issues/2633))
- Fixed a bug where duplicate inactive users could be created when using the `commerce/upgrade` command. ([#3286](https://github.com/craftcms/commerce/issues/3286))

## 4.3.0 - 2023-09-13

Expand Down
1 change: 1 addition & 0 deletions src/console/controllers/UpgradeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ public function _migrateCustomers(): void
->leftJoin(['u' => $usersTable], 'o.email = u.email')
->where(['u.email' => null])
->andWhere(['not', ['o.email' => null]])
->groupBy(['[[o.email]]'])
->column();
$this->stdoutlast(' Done. Found ' . count($guestEmails) . ' guest emails.', Console::FG_GREEN);

Expand Down

0 comments on commit fb9d51b

Please sign in to comment.