Make WordPress Core


Ignore:
Timestamp:
07/11/2005 10:39:50 PM (19 years ago)
Author:
ryan
Message:

Role/capability system. Round one. Props: Owen Winkler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable-functions.php

    r2702 r2703  
    2020    $user_pass_md5 = md5($userdata->user_pass);
    2121    $user_identity = $userdata->display_name;
    22     $current_user  = $userdata;
     22
     23    if ( empty($current_user) )
     24        $current_user = new WP_User($user_ID);
    2325}
    2426endif;
     
    3032    if ( $user_id == 0 )
    3133        return false;
    32 
     34       
    3335    if ( isset( $cache_userdata[$user_id] ) )
    3436        return $cache_userdata[$user_id];
     
    4042
    4143    foreach ( $metavalues as $meta ) {
    42         $user->{$meta->meta_key} = $meta->meta_value;
     44        @ $value = unserialize($meta->meta_value);
     45        if ($value === FALSE)
     46            $value = $meta->meta_value;
     47        $user->{$meta->meta_key} = $value;
     48
    4349        // We need to set user_level from meta, not row
    4450        if ( $wpdb->prefix . 'user_level' == $meta->meta_key )
Note: See TracChangeset for help on using the changeset viewer.