• I’m using SB Welcome Email with iThemes Security and the hide backend feature. This combination used to work fine, so it is perhaps one of the recent WP updates that created the problem.

    I’m using a shortcode for the password [reset_pass_link] in the welcome email which in theory works except for an erroneous question mark (?) that is hosing the link. It should be an ampersand (&).

    i.e. the url looks like this which does not work – note the ? before action instead of an ampersand:

    wp-login.php?itsec-hb-token=hiddenbackend?action=rp&key=randomstring&login=username

    Swap the question mark with an ampersand and the link works fine.

    I’ve also found that the reset shortcode does NOT work in the forgot password email – it just writes it plain text: [reset_pass_link]

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I found the same problem. I edited two lines that looked like:

    $reset_url = wp_login_url() . '?action=rp&key=' . $key . '&login=' . rawurlencode($user_login);

    and

    $login_url = $reset_pass_url = wp_login_url() . '?action=rp&key=' . $key . '&login=' . rawurlencode($user->user_login);

    To make sure that either ‘?’ or ‘&’ is used appropriately. These lines now look like:

    $reset_url = wp_login_url() . ((strpos(wp_login_url(),"?") !== false) ? "&" : "?") . 'action=rp&key=' . $key . '&login=' . rawurlencode($user_login);

    and

    $login_url = $reset_pass_url = wp_login_url() . ((strpos(wp_login_url(),"?") !== false) ? "&" : "?") . 'action=rp&key=' . $key . '&login=' . rawurlencode($user->user_login);

    It would be nice if this, or a similar solution, could be adapted into the main SB Welcome Email plugin.

    I’m open to any better suggestions.

    Thread Starter MBayDesign

    (@mbaydesign)

    That worked like a charm, mglgis! Thanks for that! I had also submitted this issue to iThemes support in case they could help – he submitted a compatibility report and has also, hopefully, contacted the plugin author.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘reset_pass_link producing incorrect url’ is closed to new replies.