WordPress.org

Make WordPress Core

Ticket #47851: users.php.2.diff

File users.php.2.diff, 647 bytes (added by mt8.biz, 15 months ago)

I'm sorry. Previous file is incorrect

  • src/wp-admin/users.php

     
    234234                        $userids = array_map( 'intval', (array) $_REQUEST['users'] );
    235235                }
    236236
     237                //exclude current user id
     238                if ( in_array( get_current_user_id(), $userids ) ) {
     239                        $userids = array_diff( $userids, array( get_current_user_id() ) );
     240                        $userids = array_values( $userids );
     241                }
     242
    237243                /**
    238244                 * Filters whether the users being deleted have additional content
    239245                 * associated with them outside of the `post_author` and `link_owner` relationships.