Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kieckhafer
Copy link
Member

Replacement PR for #5377

Resolves #5376
Impact: minor
Type: bugfixrefactor

Issue

Primary shopId in accounts collection, gets replaced with newly created shop id, after new shop owner invitation.
new-owner-invitation

This causes missing translation problem.
missing-translation

This causes also problem with updating email settings in Admin UI. (Maybe also other CRUD operations in Admin UI are affected, haven't tested others)

Solution

If we create a new owner user with this new shop, we want to update this new owner user, not the existing "admin" user, in the afterShopCreate appEvent. By passing the second ID field, we can determine if this is the new user, or the existing admin, and update the correct account.

Breaking changes

None

Testing

  1. Create a new shop, and pass in a new owner user ID when creating the shop.
  2. See that the new owners account is updated with the correct data, not the existing admin owners account

@aldeed aldeed merged commit ba8a7f0 into develop Oct 8, 2019
@aldeed aldeed deleted the fix-kieckhafer-correctUserOnShopCreate branch October 8, 2019 18:56
@willopez willopez mentioned this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants