WordPress.org

Make WordPress Core

Ticket #13362: 13362.diff

File 13362.diff, 803 bytes (added by mdawaffe, 5 years ago)
  • wp-includes/user.php

     
    518518        else 
    519519                $user = new WP_User($for_user_id); 
    520520 
    521         if ( 0 == $user->ID ) 
     521        $userdata   = $user->data; 
     522        $user_ID    = (int) $user->ID; 
     523        $user_level = (int) isset($user->user_level) ? $user->user_level : 0; 
     524 
     525        if ( 0 == $user->ID ) { 
     526                $user_login = $user_email = $user_url = $user_pass_md5 = $user_identity = ''; 
    522527                return; 
     528        } 
    523529 
    524         $userdata = $user->data; 
    525530        $user_login     = $user->user_login; 
    526         $user_level     = (int) isset($user->user_level) ? $user->user_level : 0; 
    527         $user_ID = (int) $user->ID; 
    528531        $user_email     = $user->user_email; 
    529532        $user_url       = $user->user_url; 
    530533        $user_pass_md5  = md5($user->user_pass);