From 0b4bd670342ea2652d2d58c3fdcee036348e725f Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@18689 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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