Changeset 58261
- Timestamp:
- 05/30/2024 09:17:58 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r58172 r58261 1103 1103 $site_capabilities_key = $wpdb->base_prefix . $blog_id . '_capabilities'; 1104 1104 1105 if ( isset( $keys[ $base_capabilities_key ] ) && 1 == $blog_id ) {1105 if ( isset( $keys[ $base_capabilities_key ] ) && 1 === $blog_id ) { 1106 1106 return true; 1107 1107 } … … 1254 1254 1255 1255 if ( 'time' === $strategy ) { 1256 if ( is_multisite() && get_current_blog_id() != $site_id ) {1256 if ( is_multisite() && get_current_blog_id() !== $site_id ) { 1257 1257 switch_to_blog( $site_id ); 1258 1258 $avail_roles = wp_roles()->get_names(); … … 2014 2014 function validate_username( $username ) { 2015 2015 $sanitized = sanitize_user( $username, true ); 2016 $valid = ( $sanitized == $username && ! empty( $sanitized ) );2016 $valid = ( $sanitized === $username && ! empty( $sanitized ) ); 2017 2017 2018 2018 /** … … 2491 2491 do_action( 'profile_update', $user_id, $old_user_data, $userdata ); 2492 2492 2493 if ( isset( $userdata['spam'] ) && $userdata['spam'] != $old_user_data->spam ) {2494 if ( 1== $userdata['spam'] ) {2493 if ( isset( $userdata['spam'] ) && $userdata['spam'] !== $old_user_data->spam ) { 2494 if ( '1' === $userdata['spam'] ) { 2495 2495 /** 2496 2496 * Fires after the user is marked as a SPAM user. … … 2749 2749 // Update the cookies if the password changed. 2750 2750 $current_user = wp_get_current_user(); 2751 if ( $current_user->ID == $user_id ) {2751 if ( $current_user->ID === $user_id ) { 2752 2752 if ( isset( $plaintext_pass ) ) { 2753 2753 wp_clear_auth_cookie(); … … 2760 2760 /** This filter is documented in wp-includes/pluggable.php */ 2761 2761 $default_cookie_life = apply_filters( 'auth_cookie_expiration', ( 2 * DAY_IN_SECONDS ), $user_id, false ); 2762 $remember = false; 2762 2763 $remember = false; 2764 2763 2765 if ( false !== $logged_in_cookie && ( $logged_in_cookie['expiration'] - time() ) > $default_cookie_life ) { 2764 2766 $remember = true; … … 3564 3566 $prefix = $wpdb->get_blog_prefix( $site_id ); 3565 3567 3566 if ( is_multisite() && get_current_blog_id() != $site_id ) {3568 if ( is_multisite() && get_current_blog_id() !== $site_id ) { 3567 3569 switch_to_blog( $site_id ); 3568 3570 $role_names = wp_roles()->get_names(); … … 3673 3675 } 3674 3676 3675 if ( $current_user->ID != $_POST['user_id'] ) {3677 if ( $current_user->ID !== (int) $_POST['user_id'] ) { 3676 3678 return false; 3677 3679 } 3678 3680 3679 if ( $current_user->user_email != $_POST['email'] ) {3681 if ( $current_user->user_email !== $_POST['email'] ) { 3680 3682 if ( ! is_email( $_POST['email'] ) ) { 3681 3683 $errors->add(
Note: See TracChangeset
for help on using the changeset viewer.