• Resolved admggp

    (@admggp)


    Hi,

    It appears that [#login_details#] in ‘Forgot password email’ does not consider a change in the url for ‘Reset Password Page’. If I change the url from ‘…/reset/’ to ‘…/b2b-reset’ the ‘Forgot password email’ still send the link with ‘…/reset/’ and consequently clicking on the link generates a page not found error.

    Best, Markus

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks Markus.

    I’m looking into it

    Hi Markus,

    You are right.

    Please replace this line

    
    $message .= site_url("reset?key=$key&login=" . rawurlencode($user_data->user_login), 'login') . "\r\n";

    with

    $reset_page = uwp_get_option('reset_page', false);
                if ($reset_page) {
                    $reset_link = add_query_arg( array(
                        'key' => $key,
                        'login' => rawurlencode($user_data->user_login),
                    ), get_permalink($reset_page) );
                    $message .= $reset_link . "\r\n";
                } else {
                    $message .= site_url("reset?key=$key&login=" . rawurlencode($user_data->user_login), 'login') . "\r\n";
                }

    The fix will be available in next version.

    Thanks for reporting.

    Thread Starter admggp

    (@admggp)

    Hi Viruthagiri, Thank you for the fast response. Can you direct me to the file where to replace $message .= site_url(“reset?key=$key&login=” . rawurlencode($user_data->user_login), ‘login’) . “\r\n”;

    File:

    userswp/includes/class-forms.php

    You will see a method called generate_forgot_message. Just search for generate_forgot_message in that file.

    Inside that method you can see that line before the last line.

    Let me know if you can’t find that.

    Thanks

    Thread Starter admggp

    (@admggp)

    Works like a charm now. Thank you for the responsive help

    You are welcome.

    Please leave a plugin review if you can ??

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Forgot password email’ is closed to new replies.