[wp-hackers] Help with get_users()
Mike Walsh
mpwalsh8 at gmail.com
Wed Sep 25 16:53:16 UTC 2013
It turns out I had forgotten that get_users() has some "magic"
functionality and I was all wrapped around the axel trying to figure out
how to return the user meta data I wanted via get_users(). I don't have to
do anything special, it does it automatically.
See: http://lists.automattic.com/pipermail/wp-hackers/2012-June/043340.html
See also: http://scribu.net/wordpress/the-magic-of-wp_user.html
Once I remembered this I got back on track quickly and resolved my problem
and have eliminated the complex query. I was helping a user with one of my
plugins and determined that the original query was causing this MySQL error:
#1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your
WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the
SELECT is okay
Mike
On Tue, Sep 24, 2013 at 11:06 PM, Chris McCoy <chris at lod.com> wrote:
> Why not use the wp user query?
>
> http://codex.wordpress.org/Class_Reference/WP_User_Query
>
> [ ... snipped ... ]
More information about the wp-hackers
mailing list