WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get blogs of user

Contents

Description

Get the blogs a user belongs to.

Parameters

$user_id
(integer) (required) User ID
Default: None
$all
(boolean) (optional) True to retrieve all blogs, or false to only retrieve blogs that are not marked as deleted, archived, or spam.
Default: false

Returns

(array) 
A list of the user's blogs. False if the user was not found or an empty array if the user has no blogs.

Change Log

Since: 3.0.0

Source File

get_blogs_of_user() is located in wp-includes/user.php.