Switch over to *_user_meta() syntax. The old get_usermeta() would return a string when only one value was found, get_user_meta() requires $single = true. Fixes #10837

git-svn-id: http://svn.automattic.com/wordpress/trunk@13329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2010-02-23 10:42:40 +00:00
parent b6050c6992
commit 4e56d1c6a9
3 changed files with 10 additions and 10 deletions

View File

@@ -543,12 +543,12 @@ function redirect_user_to_blog() {
if ( !empty( $blogs ) ) {
foreach( $blogs as $blogid => $blog ) {
if ( $blogid != $dashboard_blog->blog_id && get_user_meta( $current_user->ID , 'primary_blog' ) == $dashboard_blog->blog_id ) {
if ( $blogid != $dashboard_blog->blog_id && get_user_meta( $current_user->ID , 'primary_blog', true ) == $dashboard_blog->blog_id ) {
update_user_meta( $current_user->ID, 'primary_blog', $blogid );
continue;
}
}
$blog = get_blog_details( get_user_meta( $current_user->ID , 'primary_blog' ) );
$blog = get_blog_details( get_user_meta( $current_user->ID, 'primary_blog', true ) );
$protocol = ( is_ssl() ? 'https://' : 'http://' );
wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case"
exit;
@@ -690,7 +690,7 @@ function choose_primary_blog() {
<td>
<?php
$all_blogs = get_blogs_of_user( $current_user->ID );
$primary_blog = get_user_meta($current_user->ID, 'primary_blog');
$primary_blog = get_user_meta($current_user->ID, 'primary_blog', true);
if ( count( $all_blogs ) > 1 ) {
$found = false;
?>