get_active_blog_for_user


get_active_blog_for_user ( $user_id )

Parameters:
  • (int) user_id The unique ID of the user
Returns:
  • (WP_Site|void) The blog object
Defined at:
Change Log:
  • M: U

Description

Gets one of a user's active blogs.Returns the user's primary blog, if they have one and it is active. If it's inactive, function returns another active blog of the user. If none are found, the user is added as a Subscriber to the Dashboard Blog and that blog is returned.

Related Functions

get_blogs_of_user, get_most_active_blogs, get_blog_id_from_url, is_blog_user, get_author_user_ids

Top Google Results

User discussions

wpseek mobile