[wp-trac] [WordPress Trac] #20010: get_user does not returns specific roles
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 10 15:57:19 UTC 2012
#20010: get_user does not returns specific roles
--------------------------+----------------------
Reporter: dejudicibus | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Users | Version: 3.3.1
Severity: normal | Resolution: invalid
Keywords: |
--------------------------+----------------------
Comment (by nacin):
To further explain what is going on, 'who' => 'authors' selects all users
of the blog who are not subscribers (using user_level != 0).
role=author is more restrictive. However, when who=authors is specified,
$blog_id gets set to 0, which prevents role=author from being processed.
The processing is a bit wonky, but this is proper behavior. Choose one or
the other — who=authors is simply a shortcut that returns a superset of
role=author.
You shouldn't be receiving subscribers back. who=authors should prevent
that. Your subscribers likely have a wp_user_level of > 0, which is
incorrect for subscribers.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20010#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list