Changeset 63100 for branches/6.0/src/wp-includes/user.php
- Timestamp:
- 08/06/2026 07:38:52 PM (7 weeks ago)
- File:
-
- 1 edited
-
branches/6.0/src/wp-includes/user.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0/src/wp-includes/user.php
r54544 r63100 153 153 /* translators: %s: User name. */ 154 154 __( '<strong>Error</strong>: The username <strong>%s</strong> is not registered on this site. If you are unsure of your username, try your email address instead.' ), 155 $username155 esc_html( $username ) 156 156 ) 157 157 ); … … 178 178 /* translators: %s: User name. */ 179 179 __( '<strong>Error</strong>: The password you entered for the username %s is incorrect.' ), 180 '<strong>' . $username. '</strong>'180 '<strong>' . esc_html( $username ) . '</strong>' 181 181 ) . 182 182 ' <a href="' . wp_lostpassword_url() . '">' . … … 250 250 /* translators: %s: Email address. */ 251 251 __( '<strong>Error</strong>: The password you entered for the email address %s is incorrect.' ), 252 '<strong>' . $email. '</strong>'252 '<strong>' . esc_html( $email ) . '</strong>' 253 253 ) . 254 254 ' <a href="' . wp_lostpassword_url() . '">' . … … 3314 3314 /* translators: %s: Link to the login page. */ 3315 3315 __( '<strong>Error:</strong> This email address is already registered. <a href="%s">Log in</a> with this address or choose another one.' ), 3316 wp_login_url()3316 esc_url( wp_login_url() ) 3317 3317 ) 3318 3318 ); … … 3362 3362 /* translators: %s: Admin email address. */ 3363 3363 __( '<strong>Error</strong>: Could not register you… please contact the <a href="mailto:%s">site admin</a>!' ), 3364 get_option( 'admin_email')3364 esc_attr( get_option( 'admin_email' ) ) 3365 3365 ) 3366 3366 ); … … 3585 3585 * @since 3.0.0 3586 3586 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. 3587 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action. 3588 * 3589 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0. 3587 3590 * 3588 3591 * @global WP_Error $errors WP_Error object. 3589 3592 */ 3590 function send_confirmation_on_profile_email( ) {3593 function send_confirmation_on_profile_email( $user_id = 0 ) { 3591 3594 global $errors; 3595 3596 // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. 3597 if ( ! $user_id && isset( $_POST['user_id'] ) ) { 3598 $user_id = (int) $_POST['user_id']; 3599 } 3592 3600 3593 3601 $current_user = wp_get_current_user(); … … 3596 3604 } 3597 3605 3598 if ( $current_user->ID != $_POST['user_id']) {3606 if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { 3599 3607 return false; 3600 3608 } … … 3610 3618 ); 3611 3619 3620 $_POST['email'] = addslashes( $current_user->user_email ); 3612 3621 return; 3613 3622 } … … 3623 3632 delete_user_meta( $current_user->ID, '_new_email' ); 3624 3633 3634 $_POST['email'] = addslashes( $current_user->user_email ); 3625 3635 return; 3626 3636 }
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)