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
This commit is contained in:
westi 2011-09-16 10:57:31 +00:00
parent 96b942e891
commit 0b4bd67034
1 changed files with 4 additions and 0 deletions

View File

@ -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