WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#18427 closed feature request (duplicate)

Retrieve a user via XML-RPC

Reported by: nprasath002 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

Retrieving user information.
user is identified by user_id

Attachments (2)

wp.getUser.patch (3.6 KB) - added by nprasath002 4 years ago.
wp.getUser.2.patch (3.6 KB) - added by nprasath002 4 years ago.

Download all attachments as: .zip

Change History (11)

@nprasath0024 years ago

comment:1 @maxcutler4 years ago

  • Cc maxcutler added

FYI, this is currently broken on trunk because get_userdata now has a totally different return type and data structure. It looks like you'll want to query WP_User and ask for additional meta fields as desired.

comment:2 @scribu4 years ago

Maybe we should add a $raw parameter to get_userdata() that would simply be an alias for WP_User::get_data_by().

comment:3 @scribu4 years ago

Related: #18551

@nprasath0024 years ago

comment:4 @nprasath0024 years ago

This patch fixes that. Modified the return data

comment:5 follow-up: @jasongel3 years ago

  • Cc jasongel added

Is there a reason why this patch wasn't included in the 3.4 release? It's an obvious and much-needed addition to the API. wp.getAuthors falls way short.

comment:6 in reply to: ↑ 5 ; follow-up: @maxcutler3 years ago

Replying to jasongel:

Is there a reason why this patch wasn't included in the 3.4 release? It's an obvious and much-needed addition to the API. wp.getAuthors falls way short.

It wasn't included because we didn't have the time or resources. For 3.4 we tackled posts and taxonomies and some other small items, but determined that including users also would have been too much work. Remember, in open-source software, things only happen when someone does the legwork; for 3.4 that "someone" was mostly myself and markoheijnen, and two people working part-time can only do so much.

I have new patches for this ticket that I'll submit tonight, but we still need unit tests before they can even be considered for committing to core. And nothing will be considered until the 3.5 scope discussions, which likely will start on Wednesday.

Shameless plug: If you desperately need these methods now, please use my plugin which includes these user methods.

comment:7 in reply to: ↑ 6 @jasongel3 years ago

Thank you and markoheijnen for all of your time. You two did a fantastic job with 3.4. I'll check out your plugin and am hoping to see wp.getUser/wp.getUsers in 3.5.

Replying to maxcutler:

Replying to jasongel:

Is there a reason why this patch wasn't included in the 3.4 release? It's an obvious and much-needed addition to the API. wp.getAuthors falls way short.

It wasn't included because we didn't have the time or resources. For 3.4 we tackled posts and taxonomies and some other small items, but determined that including users also would have been too much work. Remember, in open-source software, things only happen when someone does the legwork; for 3.4 that "someone" was mostly myself and markoheijnen, and two people working part-time can only do so much.

I have new patches for this ticket that I'll submit tonight, but we still need unit tests before they can even be considered for committing to core. And nothing will be considered until the 3.5 scope discussions, which likely will start on Wednesday.

Shameless plug: If you desperately need these methods now, please use my plugin which includes these user methods.

comment:8 @maxcutler3 years ago

Using #18428 as the catch-all ticket for these users methods so that I don't have to post patches across multiple tickets. Please head over there for discussion.

comment:9 @nacin3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.