Changeset 63111 for branches/5.1/src/wp-includes/user.php
- Timestamp:
- 08/06/2026 07:53:19 PM (7 weeks ago)
- File:
-
- 1 edited
-
branches/5.1/src/wp-includes/user.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1/src/wp-includes/user.php
r47646 r63111 181 181 /* translators: %s: user name */ 182 182 __( '<strong>ERROR</strong>: The password you entered for the username %s is incorrect.' ), 183 '<strong>' . $username. '</strong>'183 '<strong>' . esc_html( $username ) . '</strong>' 184 184 ) . 185 185 ' <a href="' . wp_lostpassword_url() . '">' . … … 255 255 /* translators: %s: email address */ 256 256 __( '<strong>ERROR</strong>: The password you entered for the email address %s is incorrect.' ), 257 '<strong>' . $email. '</strong>'257 '<strong>' . esc_html( $email ) . '</strong>' 258 258 ) . 259 259 ' <a href="' . wp_lostpassword_url() . '">' . … … 2503 2503 $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email ); 2504 2504 if ( ! $user_id || is_wp_error( $user_id ) ) { 2505 $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email') ) );2505 $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' ) ) ) ); 2506 2506 return $errors; 2507 2507 } … … 2716 2716 * @since 3.0.0 2717 2717 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. 2718 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action. 2719 * 2720 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0. 2718 2721 * 2719 2722 * @global WP_Error $errors WP_Error object. 2720 2723 */ 2721 function send_confirmation_on_profile_email( ) {2724 function send_confirmation_on_profile_email( $user_id = 0 ) { 2722 2725 global $errors; 2726 2727 // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. 2728 if ( ! $user_id && isset( $_POST['user_id'] ) ) { 2729 $user_id = (int) $_POST['user_id']; 2730 } 2723 2731 2724 2732 $current_user = wp_get_current_user(); … … 2727 2735 } 2728 2736 2729 if ( $current_user->ID != $_POST['user_id']) {2737 if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { 2730 2738 return false; 2731 2739 } … … 2741 2749 ); 2742 2750 2751 $_POST['email'] = addslashes( $current_user->user_email ); 2743 2752 return; 2744 2753 } … … 2754 2763 delete_user_meta( $current_user->ID, '_new_email' ); 2755 2764 2765 $_POST['email'] = addslashes( $current_user->user_email ); 2756 2766 return; 2757 2767 }
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)