Support » Fixing WordPress » How to replicate get_users_of_blog depreciated function for latest WP

  • Hey I’m trying to create a list of authors (w/ desc) for a site I’m making and stumbled on this function, is there a way to achieve similar results with the latest version of wordpress?

    The codex entry is here.. -http://codex.wordpress.org/Function_Reference/get_users_of_blog

    Any advice would be great.

Viewing 4 replies - 1 through 4 (of 4 total)
  • publicradio

    (@publicradio)

    The codex is telling me get_users() is the new function but I’m having trouble passing any variables to this.

    The other functions show an example and unfortunately there are no examples for this new function in the codex. I would like to get_users from another blog in a multisite installation, with the role of ‘contributor’, and spit out a list of their emails. The function says blog_id and role are variables I can pass but they don’t work for me.

    Can someone post some examples of get_users, or at least one example? Thanks.

    publicradio

    (@publicradio)

    OK I got a basic function working with get_users and I added it to the codex.

    Can you provide an example, either here or in the codex, for using include and exclude? I’m doing this, and getting a list of everybody, which is like 1000 subscribers that I don’t want.

    $blogusers = get_users('blog_id=1&orderby=post_count&order=DESC&include=(86,99)');

    I tried ‘include(86,99)’ as well…same results. I tried delimiting it with role=administrator, and got nothing at all.

    Durrr…found my own answer:

    $blogusers = get_users('blog_id=1&include=99,86');

    I really thought I’d tried that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to replicate get_users_of_blog depreciated function for latest WP’ is closed to new replies.