开发者

How to import MD5MD5 (PHP-Fusion) hashed passwords into Drupal 7

Here Drupal 6 user password import to Drupal 7 is the answer for MD5 hashed passwords. Not being a programmer myself ;) I'm struggling to see where should I change the code, to work for user passwords not from a previous开发者_C百科 version of Drupal, but from PHP-Fusion (7.02.01). Could someone help me? :)


The hashing mechanism in Drupal 7 is switchable. As described in the documentation of password.inc, you can set the password_inc (for example in settings.php: $conf['password_inc'] = '/path/to/alternative/file.inc'). In that file, you need to implement the 3 functions mentioned in the above link to use the format that is used by PHP-Fusion (which you might be able to re-use to a large part).

That way, you can keep using your old hashes. You could also implement some kind of logic to use the default hashing algorithm's for new passwords and force users to set a new password the next time they log in. That might allow you to drop this part of the code after a year or so when all active users have been updated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜