• Resolved Anonymous User 15528382

    (@anonymized-15528382)


    First, thank you very much for this great plugin.

    Everything works correctly, but I can’t import the original user passwords.

    I tried to use in the third column of the CSV “Password” and “user_pass” headers but in both cases, once imported it generates a new password in the database (for both existing and new users).

    I already check the documentation tab on the plugin.

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @jranavas,

    Good evening and thanks for using this plugin.

    Password management is not simple I have to improve this part of documentation.

    • user_pass: it can be used to import passwords that are already hashed
    • password: if you use “password” column this data will be managed as I tell in documentation (I copy below).

    A string that contains user passwords. We have different options for this case:
    If you don’t create a column for passwords: passwords will be generated automatically
    If you create a column for passwords: if cell is empty, password won’t be updated; if cell has a value, it will be used

    I have to improve it in future versions!

    If you have any more question do not hesitate to ask again.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    I used user_pass in third column of the CSV, with hashed passwords. But once imported, the users have a different hashed password.

    Tried updating users and also, deleting them and importing, both cases with different hashed passwords than originals.

    Plugin Author Javier Carazo

    (@carazo)

    @jranavas,

    The line of code that does this functionality is:
    $wpdb->update( $wpdb->users, array( 'user_pass' => $data[ $i ] ), array( 'ID' => $user_id ) );

    So it has to be directly set in the database without any transformation.

    You have to use the same string that WordPress use (this is not a standard MD5 or SHA1).

    • This reply was modified 8 years, 4 months ago by Javier Carazo.
    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    I exported data (with user_pass too) from Mysql to CSV and later, the new imported users user_pass do not match with original CSV, all other data is identical.

    The only thing that differs is the domain, because is a localhost testing installation.

    Plugin Author Javier Carazo

    (@carazo)

    @jranavas,

    As you can see in this line of code, we take the user_pass from the CSV and we do an update directly to MySQL.

    So in this step is identical.

    Anyway, as you would know, maybe some plugin is executed in some later hook, so it can be changed by any plugin (even your theme or the core) later in the execution.

    But we can’t do anything with it.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    @carazo I tried in a fresh installation and with other plugins and in all cases the passwords were changed.

    Plugin Author Javier Carazo

    (@carazo)

    @jranavas,

    I have to review it.

    I am very busy, as soon as I have some minutes to check, I try and tell you then.

    Plugin Author Javier Carazo

    (@carazo)

    @jranavas,

    I found the problem and fixed it.

    Some slash strings and some user cache were creating the problem.

    Please try and tell me, and if you have one minute, give us a good review or send us a little donation.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Importing passwords’ is closed to new replies.