Ticket #31224: 31224.2.diff
File 31224.2.diff, 1.7 KB (added by , 10 years ago) |
---|
-
src/wp-includes/ms-functions.php
1918 1918 * @since MU 1919 1919 */ 1920 1920 function maybe_add_existing_user_to_blog() { 1921 if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) ) 1921 if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) ) { 1922 1922 return false; 1923 } 1923 1924 1924 1925 $parts = explode( '/', $_SERVER[ 'REQUEST_URI' ] ); 1925 1926 $key = array_pop( $parts ); 1926 1927 1927 if ( $key == '' ) 1928 if ( $key == '' ) { 1928 1929 $key = array_pop( $parts ); 1930 } 1929 1931 1930 1932 $details = get_option( 'new_user_' . $key ); 1931 if ( !empty( $details ) ) 1933 if ( !empty( $details ) ) { 1932 1934 delete_option( 'new_user_' . $key ); 1935 } 1933 1936 1934 if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) 1935 wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), home_url() ) ); 1937 if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) { 1938 wp_die( sprintf( __( 'An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.' ), home_url() ), array( 'response' => 200 ) ); 1939 } 1936 1940 1937 wp_die( sprintf( __( 'You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">log in</a> using your username and password.' ), home_url(), admin_url() ), __( 'WordPress › Success' ) );1941 wp_die( sprintf( __( 'You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">log in</a> using your username and password.' ), home_url(), admin_url() ), __( 'WordPress › Success' ), array( 'response' => 200 ) ); 1938 1942 } 1939 1943 1940 1944 /**