Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40406 closed enhancement (fixed)

Replace `is_super_admin()` check when setting up multisite

Reported by: flixos90's profile flixos90 Owned by: flixos90's profile flixos90
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch
Focuses: multisite Cc:

Description

When setting up multisite, an is_super_admin() check is made in populate_network(). As discussed with @johnbillion at WordCamp Torino, that check can easily be removed, and instead the previous query can be adjusted to query users with the administrator role only.

This ticket is part of the #37616 task and is described in https://core.trac.wordpress.org/ticket/37616#comment:62.

Attachments (1)

40406.diff (856 bytes) - added by flixos90 8 years ago.

Download all attachments as: .zip

Change History (2)

@flixos90
8 years ago

#1 @flixos90
8 years ago

  • Owner set to flixos90
  • Resolution set to fixed
  • Status changed from new to closed

In 40406:

Multisite: Replace unnecessary is_super_admin() check when setting up the initial network.

When using is_super_admin() in a non-multisite environment, the function is supposed to check for administrator capabilities. The process of querying all users and filtering them with that function can be optimized by only querying users with the administrator role instead.

Fixes #40406. See #37616.

Note: See TracTickets for help on using tickets.