Changeset 63113 for branches/4.9/src/wp-includes/user.php
- Timestamp:
- 08/06/2026 07:56:28 PM (2 months ago)
- File:
-
- 1 edited
-
branches/4.9/src/wp-includes/user.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9/src/wp-includes/user.php
r47648 r63113 170 170 /* translators: %s: user name */ 171 171 __( '<strong>ERROR</strong>: The password you entered for the username %s is incorrect.' ), 172 '<strong>' . $username. '</strong>'172 '<strong>' . esc_html( $username ) . '</strong>' 173 173 ) . 174 174 ' <a href="' . wp_lostpassword_url() . '">' . … … 242 242 /* translators: %s: email address */ 243 243 __( '<strong>ERROR</strong>: The password you entered for the email address %s is incorrect.' ), 244 '<strong>' . $email. '</strong>'244 '<strong>' . esc_html( $email ) . '</strong>' 245 245 ) . 246 246 ' <a href="' . wp_lostpassword_url() . '">' . … … 2409 2409 $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email ); 2410 2410 if ( ! $user_id || is_wp_error( $user_id ) ) { 2411 $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email') ) );2411 $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), esc_attr( get_option( 'admin_email' ) ) ) ); 2412 2412 return $errors; 2413 2413 } … … 2617 2617 * @since 3.0.0 2618 2618 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. 2619 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action. 2620 * 2621 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0. 2619 2622 * 2620 2623 * @global WP_Error $errors WP_Error object. 2621 2624 * @global wpdb $wpdb WordPress database object. 2622 2625 */ 2623 function send_confirmation_on_profile_email( ) {2626 function send_confirmation_on_profile_email( $user_id = 0 ) { 2624 2627 global $errors, $wpdb; 2628 2629 // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. 2630 if ( ! $user_id && isset( $_POST['user_id'] ) ) { 2631 $user_id = (int) $_POST['user_id']; 2632 } 2625 2633 2626 2634 $current_user = wp_get_current_user(); … … 2629 2637 } 2630 2638 2631 if ( $current_user->ID != $_POST['user_id']) {2639 if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { 2632 2640 return false; 2633 2641 } … … 2639 2647 ) ); 2640 2648 2649 $_POST['email'] = addslashes( $current_user->user_email ); 2641 2650 return; 2642 2651 } … … 2648 2657 delete_user_meta( $current_user->ID, '_new_email' ); 2649 2658 2659 $_POST['email'] = addslashes( $current_user->user_email ); 2650 2660 return; 2651 2661 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)