Make WordPress Core


Ignore:
Timestamp:
11/27/2009 06:17:44 PM (15 years ago)
Author:
westi
Message:

Restore functionality of setup_userdata() when a user id is supplied. See #11271 and #11222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/user.php

    r12267 r12288  
    449449 * @global string $user_identity The display name of the user
    450450 *
    451  * @param int $user_id Optional. User ID to setup global data.
    452  */
    453 function setup_userdata($user_id = '') {
     451 * @param int $for_user_id Optional. User ID to setup global data.
     452 */
     453function setup_userdata($for_user_id = '') {
    454454    global $user_login, $userdata, $user_level, $user_id, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity;
    455455
    456     if ( '' == $user_id )
     456    if ( '' == $for_user_id )
    457457        $user = wp_get_current_user();
    458458    else
    459         $user = new WP_User($user_id);
     459        $user = new WP_User($for_user_id);
    460460
    461461    if ( 0 == $user->ID )
Note: See TracChangeset for help on using the changeset viewer.