WP Modal Login
Password reset key has expired. Please try again. (5 posts)

  1. Forel-Solutions
    Posted 2 years ago #

    When resetting the password, wp-modal login sends an email to the user with a link to reset the password. Following that link gets the user to the wp-login.php password reset page but it has the following message: Sorry, that key has expired. Please try again.

    To verify that this occurs with the plugin, I went to the wp-login.php page directly and requested a password reset. The link from the resulting email works without getting the error message.

    Other than that I have had no problems and was able to style the modal to follow my site's theme rather easily.


  2. luiscmas
    Posted 2 years ago #

    I'm experiencing the same issue.

  3. Tsybin
    Posted 2 years ago #

    same problem :(

  4. cakecommunication
    Posted 2 years ago #

    In the file 'class-wp-modal-login.php' in the 'retrieve_password' function.


    $key = $wpdb->get_var( $wpdb->prepare( "SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login ) );
    			if ( empty( $key ) ) {
    				// Generate something random for a key...
    				$key = wp_generate_password( 20, false );
    				do_action( 'retrieve_password_key', $user_login, $key );
    				// Now insert the new md5 key into the db
    				$wpdb->update( $wpdb->users, array( 'user_activation_key' => $key ), array( 'user_login' => $user_login ) );


    $key = wp_generate_password( 20, false );
    			do_action( 'retrieve_password_key', $user_login, $key );
    			if ( empty( $wp_hasher ) ) {
    				require_once ABSPATH . 'wp-includes/class-phpass.php';
    				$wp_hasher = new PasswordHash( 8, true );
    			$hashed = $wp_hasher->HashPassword( $key );
    			$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) );

    And voilĂ  it's working with WP 3.9.1

  5. clay123
    Posted 1 year ago #

    cakecommunication I tried your code, but my problem still persists. Also anyone know whether misspelled and deprecated function called on line 284 was supposed to be commented out?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic