The md5pass feature for importing users with migrate_extras gives me fatal errors on import. I'm not importing any passwords for my users - I'm generating random passwords in hook_migrate_prepare_user(). I have the 'migrate_extras_use_md5' setting turned off.

Simple patch that wraps the md5pass functionality around some 'if' statements that check if the 'migrate_extras_use_md5' setting is enabled. Fixed the fatal errors for me.

Comments

frankcarey’s picture

StatusFileSize
new1.48 KB

Thanks for the patches, just a couple comments.

-  if (isset($newuser['md5pass'])) {
+  if (isset($newuser['md5pass']) && variable_get('migrate_extras_use_md5', 0)) {

I think we want to leave this the way it was. md5pass should only be set if someone has mapped data to that value, and if for some reason they the turn off the integration, we still want to get rid of it because it will end up being saved in $user->data

You are right about the second part though. We don't want it overwriting passwords if people have turned off the integration, even if they somehow have something mapped there. I've also beefed this check up a bit in the attached patch. Thanks!

frankcarey’s picture

Status: Needs review » Fixed

That patch is bad FYI, has a typo. Cleaned up version is committed, thanks !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jepes’s picture

Component: migrate_extras » Migrate Extras Features

So? where I can get the newest patch to fix this bug?

http://md5pass.com