Support » Plugin: WP Modal Login » Password reset key has expired. Please try again.

  • 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.

    http://wordpress.org/plugins/wp-modal-login/

Viewing 4 replies - 1 through 4 (of 4 total)
  • luiscmas

    (@luiscmas)

    I’m experiencing the same issue.

    same problem 🙁

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

    Replace

    $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 ) );
    			}

    With

    $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

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Password reset key has expired. Please try again.’ is closed to new replies.