Make WordPress Core

Ticket #40605: 40605.4.diff

File 40605.4.diff, 1.4 KB (added by bmartinent, 5 years ago)

I just remove the wp_signon() call, how is useless here.

  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index ce9cf2e857..9a1db97020 100644
    a b if ( ! in_array( $action, $default_actions, true ) && false === has_filter( 'log 
    511511        $action = 'login';
    512512}
    513513
     514if ( isset( $_GET['checkemail'] ) && $_GET['checkemail'] ) {
     515        $action = 'check-email';
     516}
     517
    514518nocache_headers();
    515519
    516520header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
    switch ( $action ) { 
    11681172                login_footer();
    11691173                exit;
    11701174
     1175        case 'check-email':
     1176                $secure_cookie = '';
     1177                $redirect_to = admin_url();
     1178
     1179                $errors = new WP_Error();
     1180
     1181                if ( isset( $_GET['checkemail'] ) && 'confirm' === $_GET['checkemail'] ) {
     1182                        $errors->add(
     1183                                'confirm',
     1184                                sprintf(
     1185                                        /* Translators: 1 is a link to the login url. */
     1186                                        __( 'Check your email for the confirmation link. Then go to <a href="%1$s">Login Page</a>' ),
     1187                                        wp_login_url()
     1188                                ),
     1189                                'message'
     1190                        );
     1191                }
     1192
     1193                /**
     1194                 * Filters the login page errors.
     1195                 *
     1196                 * @since 3.6.0
     1197                 *
     1198                 * @param object $errors      WP Error object.
     1199                 * @param string $redirect_to Redirect destination URL.
     1200                 */
     1201                $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
     1202                login_header( __( 'Log In' ), '', $errors );
     1203
     1204                login_footer();
     1205                break;
     1206
    11711207        case 'login':
    11721208        default:
    11731209                $secure_cookie   = '';