diff --git src/wp-login.php src/wp-login.php
index f289c35d4b..54d876f002 100644
|
|
if ( ! in_array( $action, $default_actions, true ) && false === has_filter( 'log |
494 | 494 | $action = 'login'; |
495 | 495 | } |
496 | 496 | |
| 497 | if ( isset( $_GET['checkemail'] ) && $_GET['checkemail'] ) { |
| 498 | $action = 'check-email'; |
| 499 | } |
| 500 | |
497 | 501 | nocache_headers(); |
498 | 502 | |
499 | 503 | header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) ); |
… |
… |
switch ( $action ) { |
1151 | 1155 | login_footer(); |
1152 | 1156 | exit; |
1153 | 1157 | |
| 1158 | case 'check-email': |
| 1159 | $secure_cookie = ''; |
| 1160 | |
| 1161 | $redirect_to = admin_url(); |
| 1162 | |
| 1163 | $reauth = empty( $_REQUEST['reauth'] ) ? false : true; |
| 1164 | |
| 1165 | $user = wp_signon( array(), $secure_cookie ); |
| 1166 | $errors = $user; |
| 1167 | |
| 1168 | // Clear errors if loggedout is set. |
| 1169 | if ( ! empty( $_GET['loggedout'] ) || $reauth ) { |
| 1170 | $errors = new WP_Error(); |
| 1171 | } |
| 1172 | |
| 1173 | if ( isset( $_GET['checkemail'] ) && 'confirm' === $_GET['checkemail'] ) { |
| 1174 | $errors->add( |
| 1175 | 'confirm', |
| 1176 | sprintf( |
| 1177 | /* Translators: 1 is a link to the login url. */ |
| 1178 | __( 'Check your email for the confirmation link. Then go to <a href="%1$s">Login Page</a>' ), |
| 1179 | wp_login_url() |
| 1180 | ), |
| 1181 | 'message' |
| 1182 | ); |
| 1183 | } |
| 1184 | |
| 1185 | /** |
| 1186 | * Filters the login page errors. |
| 1187 | * |
| 1188 | * @since 3.6.0 |
| 1189 | * |
| 1190 | * @param object $errors WP Error object. |
| 1191 | * @param string $redirect_to Redirect destination URL. |
| 1192 | */ |
| 1193 | $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); |
| 1194 | login_header( __( 'Log In' ), '', $errors ); |
| 1195 | |
| 1196 | login_footer(); |
| 1197 | break; |
| 1198 | |
1154 | 1199 | case 'login': |
1155 | 1200 | default: |
1156 | 1201 | $secure_cookie = ''; |