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
This commit is contained in:
dd32 2010-04-19 10:50:03 +00:00
parent d7f5f107e4
commit 5d597976b4
1 changed files with 0 additions and 1 deletions

View File

@ -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;