WordPress.org

Make WordPress Core

Changeset 15562


Ignore:
Timestamp:
09/04/10 12:25:44 (4 years ago)
Author:
nacin
Message:

Fix the delete_user meta cap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-includes/capabilities.php

    r15478 r15562  
    799799    case 'remove_user': 
    800800        $caps[] = 'remove_users'; 
    801         break; 
    802     case 'delete_user': 
    803         $caps[] = 'delete_users'; 
    804801        break; 
    805802    case 'promote_user': 
     
    10291026    case 'delete_users': 
    10301027        // If multisite these caps are allowed only for super admins. 
    1031         if ( is_multisite() && !is_super_admin( $user_id ) ) 
     1028        if ( is_multisite() && !is_super_admin( $user_id ) ) { 
    10321029            $caps[] = 'do_not_allow'; 
    1033         else 
     1030        } else { 
     1031            if ( 'delete_user' == $cap ) 
     1032                $cap = 'delete_users'; 
    10341033            $caps[] = $cap; 
     1034        } 
    10351035        break; 
    10361036    case 'create_users': 
Note: See TracChangeset for help on using the changeset viewer.