When migrating multiple Magento websites to Shopware 6 via migrations assistant, you can end up with the same customer account (aka email address), not being a guest and no sales_channel attached.
To find the customers, you can run the following SQL query, it will show you the email address, the ids of the customer rows and the count.
SELECT email, GROUP_CONCAT(id SEPARATOR ', '), COUNT(*) c FROM customer WHERE guest = 0 AND bound_sales_channel_id IS NULL GROUP BY email HAVING c > 1;
One thought on “Migration: Find customer which can’t login, because they have multiple accounts”