From 93cd8402f2a27c93c77d36f6efdd23c97f9d903b Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 11 Dec 2005 19:14:29 +0000 Subject: [PATCH] Update get_queried_object() to use get_userdata() when retrieving authors. fixes #2044 git-svn-id: http://svn.automattic.com/wordpress/trunk@3290 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index a6f7e638a..e8bf921df 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -734,11 +734,10 @@ class WP_Query { $this->queried_object = $this->post; $this->queried_object_id = $this->post->ID; } else if ($this->is_author) { - global $cache_userdata; - if (isset($cache_userdata[$this->get('author')])) { - $this->queried_object = $cache_userdata[$this->get('author')]; - $this->queried_object_id = $this->get('author'); - } + $author_id = $this->get('author'); + $author = get_userdata($author_id); + $this->queried_object = $author; + $this->queried_object_id = $author_id; } return $this->queried_object;