Opened 16 years ago
Closed 16 years ago
#9253 closed defect (bug) (duplicate)
_fill_user does not handle multi-value usermeta keys properly
Reported by: | bkrausz | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7.1 |
Component: | General | Keywords: | usermeta |
Focuses: | Cc: |
Description
The following code, line 535ish of wp-includes/user.php
$metavalues = $wpdb->get_results($wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user->ID)); $wpdb->show_errors($show); if ( $metavalues ) { foreach ( (array) $metavalues as $meta ) { $value = maybe_unserialize($meta->meta_value); $user->{$meta->meta_key} = $value; } }
This does not work for meta keys that have multiple values. Right now get_usermeta doesn't act according to spec because this fills the cache it pulls from.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Tracking this with #7540