Bonjour - on the project page the following is stated:

  • Can create random passwords for each new account
  • Can import passwords from CSV file

I have just successfully imported about 96 users using your module (merci!) and had no issues except two: French charaters (reported here) and the fact that I have not found anywhere any setting or option concerning passwords. How can I import passwords? Or how can I have your module generate them? In the latter case, how do I know what are the passwords? Thks! -PC

Comments

jhaggenburg’s picture

I've got exactly the same question. It's listed, but how do I use it?
Great module and a real time-saver by the way! :)

J.

evelien’s picture

You can match a password field within your CSV with the drupal-field password during import.
The module can generate these passwords also. But when you let the module generate some passwords, you also have to generate e-mails with it for sending out these passwords. You can setup the mail anyway you want to.

robert castelo’s picture

Thanks evelien.

I should also point out that the imported passwords must be in plain text, Drupal will encrypt them before storing them. If they are already encrypted they will not be usable.

vermario’s picture

Hi, about the last comment
"If they are already encrypted they will not be usable"

I happen to have to import 1100 users from another db, which uses the same algorithm (md5). I was wondering if there's a way to tell drupal not to crypt the passwords during import, and then restore it later? Even hacking the user module temporarily (i'm doing everything on an offline site)...

Any ideas? :)

Thank you so much for this very very useful module!! :)

vermario’s picture

Nevermind, I did it by shamelessly hacking the user_save function in the user_module:

Line 193:

switch ($key) {
        case 'pass':
          $fields[] = $key;
          //temporary hack remember to revert later!
          //$values[] = md5($value);
          $values[] = $value;
          $s[] = "'%s'";
          break;

This way the password is written in the database "as is" without being encrypted.

This is useful only if you have a csv with md5 encrypted passwords!

coupet’s picture

Valuable tip

robert castelo’s picture

Be careful with this.

I was considering implementing this feature but was warned that there are various different MD5 versions, but haven't had time to investigate.

robert castelo’s picture

Status: Active » Closed (duplicate)

Merging this request:

http://drupal.org/node/134490