Changeset 52687
- Timestamp:
- 02/07/2022 02:45:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-edit.php
r52398 r52687 14 14 $user_id = (int) $user_id; 15 15 $current_user = wp_get_current_user(); 16 16 17 if ( ! defined( 'IS_PROFILE_PAGE' ) ) { 17 define( 'IS_PROFILE_PAGE', ( $user_id == $current_user->ID ) );18 define( 'IS_PROFILE_PAGE', ( $user_id === $current_user->ID ) ); 18 19 } 19 20 … … 94 95 if ( is_multisite() 95 96 && ! current_user_can( 'manage_network_users' ) 96 && $user_id != $current_user->ID97 && $user_id !== $current_user->ID 97 98 && ! apply_filters( 'enable_edit_any_user_configuration', true ) 98 99 ) { … … 167 168 168 169 // Grant or revoke super admin status if requested. 169 if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) ) { 170 if ( is_multisite() && is_network_admin() 171 && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) 172 && ! isset( $super_admins ) && empty( $_POST['super_admin'] ) === is_super_admin( $user_id ) 173 ) { 170 174 empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id ); 171 175 } … … 509 513 <td><input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" /> 510 514 <?php 511 if ( $profileuser->ID == $current_user->ID ) :515 if ( $profileuser->ID === $current_user->ID ) : 512 516 ?> 513 517 <p class="description" id="email-description"> … … 518 522 519 523 $new_email = get_user_meta( $current_user->ID, '_new_email', true ); 520 if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID== $current_user->ID ) :524 if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profileuser->ID === $current_user->ID ) : 521 525 ?> 522 526 <div class="updated inline"> … … 863 867 foreach ( $profileuser->caps as $cap => $value ) { 864 868 if ( ! $wp_roles->is_role( $cap ) ) { 865 if ( '' != $output ) {869 if ( '' !== $output ) { 866 870 $output .= ', '; 867 871 }
Note: See TracChangeset
for help on using the changeset viewer.