Title: get_blogs_of_user error
Last modified: August 19, 2016

---

# get_blogs_of_user error

 *  [geofeedz](https://wordpress.org/support/users/geofeedz/)
 * (@geofeedz)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get_blogs_of_user-error/)
 *     ```
       <?php
       $user_id = 1;
       $user_blogs = get_blogs_of_user( $user_id );
       echo 'User '.$user_id.'\'s blogs:<ul>';
       foreach ($user_blogs AS $user_blog) {
           echo '<li>'.$user_blog->userblog_id.'</li>';
       }
       echo '</ul>';
       ?>
       ```
   
 * Is giving an Warning: Invalid argument supplied for foreach() in blah/blaha/ 
   on line 5
    Does anyone know how to call the current users blog_Id a different
   way.

The topic ‘get_blogs_of_user error’ is closed to new replies.

## Tags

 * [current user](https://wordpress.org/support/topic-tag/current-user/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 0 replies
 * 1 participant
 * Last reply from: [geofeedz](https://wordpress.org/support/users/geofeedz/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/get_blogs_of_user-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
