What function returns a Drupal-6-valid password hash?

teephonge

New Member
I want to make a script to insert some 100 users into a Drupal 6 database - their username, mail and password hash.After reading about the PHP class that Drupal 6 uses, I'm not sure I can pull this off.My method was to send every user a mail like "Hello, x! Your new password is y", then insert the hashed "y" into Drupal's user table.I know Drupal returns an md5. But it doesn't just md5's the original password, but a very mixed-up password (using salt and other methods).I've looked into the Portable PHP password hashing framework Drupal's using, but I don't think it works just with a copy+paste method.So, my question is: can I make a PHP function that returns a valid Drupal 6 password hash to insert it into its user table?
 
Back
Top