Make WordPress Core


Ignore:
Timestamp:
04/21/2010 05:43:53 PM (14 years ago)
Author:
ryan
Message:

Separate user deletion and removal. Add promote_users cap so that multisite Admins (not supes) can promote. see #13074

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r14168 r14176  
    18241824
    18251825        // Set up the hover actions for this user
    1826         $del_cap_type = 'remove';
    1827         if ( !is_multisite() && current_user_can('delete_users') )
    1828             $del_cap_type = 'delete';
    1829 
    18301826        $actions = array();
    18311827        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    1832         if ( $current_user->ID != $user_object->ID && current_user_can( $del_cap_type . '_user', $user_object->ID ) )
     1828        if ( !is_multisite() && $current_user->ID != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
    18331829            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
     1830        if ( is_multisite() && $current_user->ID != $user_object->ID && current_user_can('remove_user', $user_object->ID) )
     1831            $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . "</a>";
    18341832        $actions = apply_filters('user_row_actions', $actions, $user_object);
    18351833        $action_count = count($actions);
Note: See TracChangeset for help on using the changeset viewer.