User data migration should be complete

git-svn-id: https://develop.svn.wordpress.org/trunk@2636 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2005-06-13 08:32:44 +00:00
parent 8a2da7e506
commit f6ef88773f
13 changed files with 103 additions and 147 deletions
+7 -3
View File
@@ -1164,9 +1164,13 @@ function update_category_cache() {
function update_user_cache() {
global $cache_userdata, $wpdb;
if ( $users = $wpdb->get_results("SELECT * FROM $wpdb->users WHERE user_level > 0") ) :
$query = apply_filters('user_cache_query', "SELECT * FROM $wpdb->users WHERE user_level > 0");
if ( $users = $wpdb->get_results( $query ) ) :
foreach ($users as $user) :
$metavalues = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = '$user->ID'");
foreach ( $metavalues as $meta )
$user->{$meta->meta_key} = $meta->meta_value;
$cache_userdata[$user->ID] = $user;
$cache_userdata[$user->user_login] =& $cache_userdata[$user->ID];
endforeach;
@@ -1280,7 +1284,7 @@ function is_author ($author = '') {
if ($author == $author_obj->ID) {
return true;
} else if ($author == $author_obj->user_nickname) {
} else if ($author == $author_obj->nickname) {
return true;
} else if ($author == $author_obj->user_nicename) {
return true;