craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
286 stars 140 forks source link

Imported passwords are not working #1322

Open romainpoirier opened 1 year ago

romainpoirier commented 1 year ago

Description

I'm trying to move a large batch of users from a Craft 3 to a separate Craft 4 websites (only some selected data should be migrated).

I've exported users with passwords thought the Element API:

return [
    'elementType' => User::class,
    'transformer' => function(User $user) {
        $user = User::find()
            ->addSelect(['users.password'])
            ->id($user->id)
            ->one();

        return [
            'firstName' => $user->firstName,
            'lastName' => $user->lastName,
            'password' => $user->password
        ];
    },
];

However, even if the passwords are mapped by FeedMe, the users can't log in with their initial password, probably because of the hash. Why and how to make their passwords working on their migrated accounts?

I know I could ask users to request a new password on the new Craft 4, but this is not the solution I'm looking for.

Steps to reproduce

  1. Import users with their passwords
  2. Try to log in as a user that you know the password

Additional info

ccchapman commented 6 months ago

Confirming this seems to be an open issue for us. I tried with hashed password strings and plaintext passwords. Neither seems to work.