From ae80425b1ed9eba6e065d4115256fc070948fa9b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 27 Jul 2006 23:27:27 +0000 Subject: [PATCH] Use get_userdata(). fixes #2976 git-svn-id: https://develop.svn.wordpress.org/trunk@4055 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/author-template.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index f265b3ba24..96b70b363e 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -142,8 +142,11 @@ function get_author_link($echo = false, $author_id, $author_nicename) { $file = get_settings('home') . '/'; $link = $file . '?author=' . $auth_ID; } else { - if ( '' == $author_nicename ) - $author_nicename = $cache_userdata[$author_id]->user_nicename; + if ( '' == $author_nicename ) { + $user = get_userdata($author_id); + if ( !empty($user->user_nicename) ) + $author_nicename = $user->user_nicename; + } $link = str_replace('%author%', $author_nicename, $link); $link = get_settings('home') . trailingslashit($link); }