Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#20967 closed defect (bug) (wontfix)

wp.getAuthors is returning more than just authors

Reported by: zimbelp's profile zimbelp Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

The XMLRPC API call to getAuthors is returning any user entries, not just authors. For example, it is returning subscriber users as well. This should be scoped to just authors as the name/documentation imply.

Attachments (1)

wp.getAuthors.diff (647 bytes) - added by zimbelp 12 years ago.
scope get_users call to only return authors

Download all attachments as: .zip

Change History (5)

@zimbelp
12 years ago

scope get_users call to only return authors

#1 follow-up: @maxcutler
12 years ago

  • Cc maxcutler added

While valid, I don't think this can be changed without breaking backwards compatibility.

A better course of action for 3.5 would be to deprecate wp.getAuthors and add wp.getUser/wp.getUsers (#18427/#18428).

#2 in reply to: ↑ 1 @josephscott
12 years ago

Replying to maxcutler:

While valid, I don't think this can be changed without breaking backwards compatibility.

A better course of action for 3.5 would be to deprecate wp.getAuthors and add wp.getUser/wp.getUsers (#18427/#18428).

Agreed, I don't think there is any point in having role specific RPC methods to get users with that particular role. Better to have a generalized method that has the ability to filter based on role.

#3 follow-up: @jasongel
12 years ago

  • Cc jasongel added

Adding wp.getUser/wp.getUsers is a simple and obvious solution. All author fields should be exposed in the API. How do we up vote (#18427/#18428) so they get through review and into the next nightly build?

#4 in reply to: ↑ 3 @maxcutler
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Replying to jasongel:

Adding wp.getUser/wp.getUsers is a simple and obvious solution. All author fields should be exposed in the API. How do we up vote (#18427/#18428) so they get through review and into the next nightly build?

I posted a response on #18427. Going to close this ticket and move discussion there as a feature request.

Note: See TracTickets for help on using tickets.