• Todd Edelman

    (@toddedelman)


    Hi Javier!

    In WordPress > 4.3, you’re not allowed to email set passwords to users, rather, you need to send them the password reset link so they can choose their own password. So, how do I upload our list without passwords?

    As mentioned in other ticket, we’re not going to be sending notification emails with your plugin.

    Thanks,
    Todd

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

    (@carazo)

    Todd,

    You can ask in your notification to reset their passwords (as WordPress really do).

    Send the reset link password.

    Thread Starter Todd Edelman

    (@toddedelman)

    Hi

    I’m sorry. I don’t understand.

    Can you clarify, maybe with screenshots?

    Thanks,
    Todd

    Plugin Author Javier Carazo

    (@carazo)

    Todd,

    If you are going to use a mail plugin that I don’t know I cannot tell you more.

    Only what I have told you: “Send a link to users where they can reset their passwords”.

    Javier,

    What Todd was referencing is a password reset url containing a password reset key versus a simple url that goes to the page where a user can request a password reset.

    Password reset url:
    http://siteurl.com/wp-login.php?action=rp&key=5mUBMjInHtwKNZY3APX7&login=username

    Lost Password URL:
    http://siteurl.com/wp-login.php?action=lostpassword

    I ran into the same issue, we’d prefer not to send passwords to users directly via email for security reasons, so I actually made the following changes, feel free to use this or discard this as you wish. This utilizes the get_password_reset_key() function.

    Added a new email variable **passwordreseturl** and the following code to import-users-from-csv-with-meta/importer.php:

    // send mail
    if( isset( $form_data["sends_email"] ) && $form_data["sends_email"] && $mail_for_this_user ):
    //Because sending email passwords in plaintext is bad
    // Generate password reset key.
    $key= get_password_reset_key( $user_object );
    $user_login= $user_object->user_login;
    
    $passwordreset_url  = network_site_url( 'wp-login.php?action=rp&key=' . $key . '&login=' . rawurlencode( $user_login ), 'login' );
    
    $body_mail = get_option( "acui_mail_body" );
    $subject = get_option( "acui_mail_subject" );
    												
    $body_mail = str_replace("**loginurl**", "<a href='" . home_url() . "/wp-login.php" . "'>" . home_url() . "/wp-login.php" . "</a>", $body_mail);
    $body_mail = str_replace("**lostpasswordurl**", wp_lostpassword_url(), $body_mail);
    $body_mail = str_replace("**passwordreseturl**", $passwordreset_url, $body_mail);
    $body_mail = str_replace("**username**", $username, $body_mail);
    
    • This reply was modified 9 years, 12 months ago by Mary Wheeler.
    Plugin Author Javier Carazo

    (@carazo)

    @ransim,

    Thank you very much! I have just included it in the plugin repository with mention to you.

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

The topic ‘Uploading list and managing passwords’ is closed to new replies.