Changeset 4054

Show
Ignore:
Timestamp:
07/27/06 23:25:45 (2 years ago)
Author:
ryan
Message:

Use get_userdata(). fixes #2976

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-includes/template-functions-author.php

    r3205 r4054  
    143143        $link = $file . '?author=' . $auth_ID; 
    144144    } else { 
    145         if ( '' == $author_nicename ) 
    146             $author_nicename = $cache_userdata[$author_id]->user_nicename; 
     145        if ( '' == $author_nicename ) { 
     146            $user = get_userdata($author_id); 
     147            if ( !empty($user->user_nicename) ) 
     148                $author_nicename = $user->user_nicename; 
     149        } 
    147150        $link = str_replace('%author%', $author_nicename, $link); 
    148151        $link = get_settings('home') . trailingslashit($link);