Changeset 20581 for trunk/wp-includes/user.php
- Timestamp:
- 04/24/2012 10:13:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/user.php
r20532 r20581 653 653 * @param int $user_id User ID 654 654 * @param bool $all Whether to retrieve all blogs, or only blogs that are not marked as deleted, archived, or spam. 655 * @return array A list of the user's blogs. False if the user was not found or an empty array if the user hasno blogs.655 * @return array A list of the user's blogs. An empty array if the user doesn't exist or belongs to no blogs. 656 656 */ 657 657 function get_blogs_of_user( $user_id, $all = false ) { … … 662 662 // Logged out users can't have blogs 663 663 if ( empty( $user_id ) ) 664 return false;664 return array(); 665 665 666 666 $keys = get_user_meta( $user_id ); 667 667 if ( empty( $keys ) ) 668 return false;668 return array(); 669 669 670 670 if ( ! is_multisite() ) { … … 746 746 747 747 $blogs = get_blogs_of_user( $user_id ); 748 if ( is_array( $blogs ) ) 749 return array_key_exists( $blog_id, $blogs ); 750 else 751 return false; 748 return array_key_exists( $blog_id, $blogs ); 752 749 } 753 750
Note: See TracChangeset
for help on using the changeset viewer.