WordPress.org

Make WordPress Core

Changeset 20085


Ignore:
Timestamp:
03/02/2012 08:59:30 PM (6 years ago)
Author:
nacin
Message:

$userdata should be null for anonymous requests. props MattyRob. props duck_ for the unit test. fixes #19769 for trunk.

File:
1 edited

Legend:

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

    r19910 r20085  
    937937        $user = new WP_User($for_user_id);
    938938
    939     $userdata   = $user;
     939    $userdata   = null;
    940940    $user_ID    = (int) $user->ID;
    941941    $user_level = (int) isset($user->user_level) ? $user->user_level : 0;
     
    946946    }
    947947
    948     $user_login = $user->user_login;
    949     $user_email = $user->user_email;
    950     $user_url   = $user->user_url;
    951     $user_pass_md5  = md5($user->user_pass);
    952     $user_identity  = $user->display_name;
     948    $userdata   = $user;
     949    $user_login = $user->user_login;
     950    $user_email = $user->user_email;
     951    $user_url   = $user->user_url;
     952    $user_pass_md5 = md5( $user->user_pass );
     953    $user_identity = $user->display_name;
    953954}
    954955
Note: See TracChangeset for help on using the changeset viewer.