0

I have done data migration using data migration tool from magento 1.9.x to 2.2.4, but it doesn't import admin users as mentioned in the docs, and we need to manually copy the admin users.

What I have done is, I have simply copied the users from magento1DB.admin_user to magento2DB.admin_user table. I can see that users are now appearing in the Magento2 backend, but when I try to edit any admin user, it throws an exception.

Exception #0 (InvalidArgumentException): Unable to unserialize value

Also, I cannot login with the Magento1 admin user in Magento2 admin panel.

Couldn't find any help, does any one have an idea?

1

The reason why you're receiving that error is because Magento 2 uses json to store complex data within database, so the column "extra" of the "admin_user" table has a format miss-match.

If you've copied it from from Magento 1 to Magento 2 you need to ensure that you re-parse values of that column.

Magento 1 "admin_user table extra column" stores serialized data.
Magento 2 "admin_user table extra column" stores json encoded data.

That being said - there are many other issues that would need to be solved to achieve what you need. It is not only the admin_user table that you need to merge. You also need to merge roles and rules. To make matters worse - the Magento 2 ACL is quite a bit different than Magento 1.

On top of that - the Magento 1 and Magento 2 use different password algorithms, so just copy-pasting the column values will not work.

In general - unless you're migrating hundreds of admin accounts the best way to do it is what Magento guidelines recommend - recreate them manually reusing some of the data from Magento 1, such as name, username, email.

Reference: https://devdocs.magento.com/guides/v2.3/migration/migration-manually.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.