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: - Introduced in WordPress: —
- Deprecated in WordPress: —
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.