From 5d597976b4c9a1bfc56cfea5e2f64ccd409f3d68 Mon Sep 17 00:00:00 2001 From: dd32 Date: Mon, 19 Apr 2010 10:50:03 +0000 Subject: [PATCH] Remove double-query for Author ID. Props simonwheatley. Fixes #12048 git-svn-id: http://svn.automattic.com/wordpress/trunk@14160 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 1 - 1 file changed, 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index d42ed30928..1590418c34 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2080,7 +2080,6 @@ class WP_Query { } } $q['author_name'] = sanitize_title($q['author_name']); - $q['author'] = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename='".$q['author_name']."'"); $q['author'] = get_user_by('slug', $q['author_name']); if ( $q['author'] ) $q['author'] = $q['author']->ID;