Opened 22 months ago

Closed 9 months ago

#18427 closed feature request (duplicate)

Retrieve a user via XML-RPC

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

Description

Retrieving user information.
user is identified by user_id

Attachments (2)

wp.getUser.patch (3.6 KB) - added by nprasath002 22 months ago.
wp.getUser.2.patch (3.6 KB) - added by nprasath002 17 months ago.

Download all attachments as: .zip

Change History (11)

  • 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.

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

Related: #18551

This patch fixes that. Modified the return data

comment:5 follow-up: ↓ 6   jasongel11 months 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: ↓ 7   maxcutler11 months 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   jasongel11 months 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.

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.

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