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
This commit is contained in:
Peter Westwood 2011-09-16 10:57:31 +00:00
parent 44821916ca
commit af72ac6ff5
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