WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11776 closed defect (bug) (fixed)

in ms-edit.php, a query could be removed by using the object cache

Reported by: Denis-de-Bernardy Owned by:
Milestone: 3.0 Priority: low
Severity: minor Version: 3.0
Component: Optimization Keywords:
Focuses: multisite Cc:

Description

there is a call that goes:

$uid = $wpdb->get_var( "SELECT ID FROM {$wpdb->users} WHERE user_login='{$site_admin}'" );

we could use the wp_cache_get() and user logins bucket instead to avoid a query.

Change History (2)

comment:1 nacin4 years ago

  • Keywords multisite added

comment:2 ryan4 years ago

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

(In [12935]) Use API to retrieve user. fixes #11776

Note: See TracTickets for help on using tickets.