From af72ac6ff54c397ac8180f40795cfb3374f9b613 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 16 Sep 2011 10:57:31 +0000 Subject: [PATCH] Get out quick if we have been passed the ID of the 'logged out' user. git-svn-id: https://develop.svn.wordpress.org/trunk@18689 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/user.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/user.php b/wp-includes/user.php index 65d24f65dc..a75d4832f4 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -664,6 +664,10 @@ function get_blogs_of_user( $id, $all = false ) { return $blogs; } + // Logged out users can't have blogs + if ( 0 === $id ) + return false; + $blogs = wp_cache_get( 'blogs_of_user-' . $id, 'users' ); // Try priming the new cache from the old cache