Changeset 52581
- Timestamp:
- 01/15/2022 08:47:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-users-list-table.php
r52426 r52581 448 448 if ( current_user_can( 'list_users' ) ) { 449 449 // Set up the user editing link. 450 $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user_object->ID ) ) ); 450 $edit_link = esc_url( 451 add_query_arg( 452 'wp_http_referer', 453 urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 454 get_edit_user_link( $user_object->ID ) 455 ) 456 ); 451 457 452 458 if ( current_user_can( 'edit_user', $user_object->ID ) ) { … … 457 463 } 458 464 459 if ( ! is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) ) { 465 if ( ! is_multisite() 466 && get_current_user_id() !== $user_object->ID 467 && current_user_can( 'delete_user', $user_object->ID ) 468 ) { 460 469 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . '</a>'; 461 470 } 462 if ( is_multisite() && current_user_can( 'remove_user', $user_object->ID ) ) { 471 472 if ( is_multisite() 473 && current_user_can( 'remove_user', $user_object->ID ) 474 ) { 463 475 $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url . "action=remove&user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . '</a>'; 464 476 } … … 477 489 478 490 // Add a link to send the user a reset password link by email. 479 if ( get_current_user_id() !== $user_object->ID && current_user_can( 'edit_user', $user_object->ID ) ) { 491 if ( get_current_user_id() !== $user_object->ID 492 && current_user_can( 'edit_user', $user_object->ID ) 493 ) { 480 494 $actions['resetpassword'] = "<a class='resetpassword' href='" . wp_nonce_url( "users.php?action=resetpassword&users=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Send password reset' ) . '</a>'; 481 495 }
Note: See TracChangeset
for help on using the changeset viewer.