MDVA-28661: issue with company users management when changing admin email

The MDVA-28861 patch fixes the issue where the users get an error when changing the admin email. This patch is available when the Quality Patches Tool (QPT) 1.0.5 is installed. The Patch ID is MDVA-28861.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.3.0 to 2.4.1 (including 2.3.5-p1) with B2B extension

NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

After changing the Company Admin email address, an error is returned, and the Company Users list is not displayed.

Steps to reproduce:

  1. Enable Company functionality (Learn more about that in Install B2B: Enable B2B features in the Commerce Admin in our developer documentation and create a new Company with two users - an admin and two users - all with email addresses).
  2. Go to the Commerce Admin > Customers > Companies and open your Company account.
  3. Open Company Admin tab and change admin to the first user, which includes changing the Company Admin email to the first user’s email.
  4. Go to the Adobe Commerce frontend and log in as the first user.
  5. Go to the Company Users section.

Expected results:

The Company Users list should be displayed as expected.

Actual results:

The Company Users list is not displayed, and an error similar to the following displays:

No such entity with id = 2

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

To learn more about B2B Company functionality, refer to these articles in our developer documentation:

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a