The MU forums have moved to WordPress.org

Getting List Of Blogs Administrated By User ID (6 posts)

  1. mdvaldosta
    Member
    Posted 15 years ago #

    Might anyone be able to offer insight for a function to spit out a list of blogs owned by a user? For example, listing all blogs owned / administrated by user 2? I'm at a loss as how to go about doing this.

  2. mdvaldosta
    Member
    Posted 15 years ago #

    Totally didn't mean to post this twice, I thought it didn't go through the first time and can't find a delete button :/

  3. SteveAtty
    Member
    Posted 15 years ago #

    its in the wp_usermeta table.

    restrict the query using userid=2 (for example) and look for for meta_keys which will be in the form wp_blogid_userlevel. If the values are 10 then that user is an administrator for that blog. Also look for meta_keys for primary_blog which will tell you which blog they own

  4. tdjcbe
    Member
    Posted 15 years ago #

    I answered you in your other thread but there's built in functions that do this as well. They're discussed in this thread:

    http://mu.wordpress.org/forums/topic.php?id=6252

    I believe you can pass the user_id to both functions but I'm not in a position to check.

  5. mdvaldosta
    Member
    Posted 15 years ago #

    Thanks Steven, and tdjcbe that looks like just what I was after. I'll take a look and see if I can work with one of those functions.

  6. nitetalker
    Member
    Posted 15 years ago #

    Mdvaldosta, you might also take a look at
    http://mu.wordpress.org/forums/topic.php?id=2730

    but you already responded to the code I posted there. Are there two of you? :)

About this Topic

  • Started 15 years ago by mdvaldosta
  • Latest reply from nitetalker