[wp-trac] [WordPress Trac] #39311: New user activation welcome page links to the wrong site

WordPress Trac noreply at wordpress.org
Wed Jul 1 20:46:29 UTC 2020


#39311: New user activation welcome page links to the wrong site
-------------------------------------------------+-------------------------
 Reporter:  tmoore41                             |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.5
Component:  Login and Registration               |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-       |     Focuses:  multisite
  refresh                                        |
-------------------------------------------------+-------------------------

Comment (by pkarjala):

 @whyisjake I think this is what you are asking for?  Please confirm!

 {{{#!php
 <?php
 /**
  * Returns the URL that allows the user to retrieve the lost password
  *
  * @since 2.8.0
  *
  * @param string $redirect Path to redirect to on login.
  * @return string Lost password URL.
  */
 function wp_lostpassword_url( $redirect = '' ) {
         $args = array();
         if ( ! empty( $redirect ) ) {
                 $args['redirect_to'] = urlencode( $redirect );
         }
         $args['action'] = "lostpassword";

         $blog_details = get_blog_details();

         $lostpassword_url = add_query_arg( $args, network_site_url(
 $blog_details->path . 'wp-login.php', 'login' ) );

         /**
          * Filters the Lost Password URL.
          *
          * @since 2.8.0
          *
          * @param string $lostpassword_url The lost password page URL.
          * @param string $redirect         The path to redirect to on
 login.
          */
         return apply_filters( 'lostpassword_url', $lostpassword_url,
 $redirect );
 }
 }}}

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


More information about the wp-trac mailing list