WordPress.org

Make WordPress Core

Changeset 45407


Ignore:
Timestamp:
05/25/2019 12:12:22 AM (3 weeks ago)
Author:
johnbillion
Message:

Users: Allow Super Admins to remove themselves from a site on a Multisite network.

Props Mista-Flo, birgire

Fixes #41439

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r44574 r45407  
    432432                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . '</a>';
    433433            }
    434             if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) ) {
     434            if ( is_multisite() && current_user_can( 'remove_user', $user_object->ID ) ) {
    435435                $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url . "action=remove&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . '</a>';
    436436            }
Note: See TracChangeset for help on using the changeset viewer.