[wp-trac] [WordPress Trac] #14140: Wrap URL for password reset in angle brackets

WordPress Trac noreply at wordpress.org
Thu Feb 2 21:33:49 UTC 2017


#14140: Wrap URL for password reset in angle brackets
-------------------------+---------------------
 Reporter:  demetris     |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  3.1
Component:  Mail         |     Version:  3.0
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+---------------------

Comment (by megamenu):

 This has been causing my users (and therefore me) a few problems over the
 past couple of years. I've finally got around to taking a closer look at
 it. Some email clients will make the angled brackets part of the URL,
 therefore corrupting the URL.

 I'm not sure if this is the right place to post this, but it comes up on
 Google when I search for the issue. Adding the following to your themes
 functions.php file will add another link to the password reset email (sans
 angled brackets).

 {{{
 function fix_password_reset_link($message, $key, $user_login, $user_data)
 {
         $message .= "\r\nLink not working? Copy and paste the following
 into your browser address bar:\r\n\r\n";
         $message .= network_site_url("wp-
 login.php?action=rp&key=$key&login=" . rawurlencode($user_login),
 'login');

         return $message;
 }
 add_filter( 'retrieve_password_message', 'fix_password_reset_link', 10,
 4);
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14140#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list