WordPress.org

Make WordPress Core

Changeset 12612


Ignore:
Timestamp:
01/06/2010 11:39:40 PM (11 years ago)
Author:
ryan
Message:

Return true for all admin user is multisite is not enabled. see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r12611 r12612  
    10851085    $user = new WP_User($user_id);
    10861086
    1087     $site_admins = get_site_option( 'site_admins', array('admin') );
    1088     if ( is_array( $site_admins ) && in_array( $user->user_login, $site_admins ) )
    1089         return true;
     1087    if ( is_multisite() ) {
     1088        $site_admins = get_site_option( 'site_admins', array('admin') );
     1089        if ( is_array( $site_admins ) && in_array( $user->user_login, $site_admins ) )
     1090            return true;
     1091    } else {
     1092        if ( $user->has_cap('delete_users') )
     1093            return true;
     1094    }
    10901095
    10911096    return false;
Note: See TracChangeset for help on using the changeset viewer.