Make WordPress Core


Ignore:
Timestamp:
02/10/2011 08:38:04 PM (13 years ago)
Author:
ryan
Message:

Disallow and hide user removal (as opposed to deletion) for single site installs. Removal is a multisite concept. Props nacin. fixes #16501 for 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-admin/users.php

    r17432 r17440  
    201201    check_admin_referer('remove-users');
    202202
     203    if ( ! is_multisite() )
     204        wp_die( __( 'You can’t remove users.' ) );
     205
    203206    if ( empty($_REQUEST['users']) ) {
    204207        wp_redirect($redirect);
     
    206209    }
    207210
    208     if ( !current_user_can('remove_users') )
    209         die(__('You can’t remove users.'));
     211    if ( ! current_user_can( 'remove_users' ) )
     212        wp_die( __( 'You can’t remove users.' ) );
    210213
    211214    $userids = $_REQUEST['users'];
     
    234237
    235238    check_admin_referer('bulk-users');
     239
     240    if ( ! is_multisite() )
     241        wp_die( __( 'You can’t remove users.' ) );
    236242
    237243    if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) {
Note: See TracChangeset for help on using the changeset viewer.