Changeset 10990
- Timestamp:
- 05/21/2021 06:12:00 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php
r10981 r10990 359 359 360 360 $updated_email = false; 361 $new_email = trim( wp_unslash( $_POST['user_email'] ?? '' ) ); 361 362 if ( 362 363 'pending' === $state && 363 364 empty( $pending_user['meta']['changed_email'] ) && // Only if they've not changed it before. 364 ! empty( $_POST['user_email'] )&&365 wp_unslash( $_POST['user_email'] )!== $pending_user['user_email']365 $new_email && 366 $new_email !== $pending_user['user_email'] 366 367 ) { 367 368 // Validate the email 368 $error_user_email = rest_do_request( new WP_REST_Request( 'GET', '/wporg/v1/email-in-use/' . wp_unslash( $_POST['user_email'] )) );369 $error_user_email = rest_do_request( new WP_REST_Request( 'GET', '/wporg/v1/email-in-use/' . $new_email ) ); 369 370 if ( $error_user_email->get_data()['available'] ) { 370 371 // Change their email, resend confirmation. 371 372 $pending_user['meta']['changed_email'] = $pending_user['user_email']; 372 $pending_user['user_email'] = wp_unslash( $_POST['user_email'] );373 $pending_user['user_email'] = $new_email; 373 374 $pending_user['user_activation_key'] = ''; // Clear any existing email hash. 374 375 $updated_email = true;
Note: See TracChangeset
for help on using the changeset viewer.