Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#18427 closed feature request (duplicate)

Retrieve a user via XML-RPC

Reported by: nprasath002's profile 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 12 years ago.
wp.getUser.2.patch (3.6 KB) - added by nprasath002 12 years ago.

Download all attachments as: .zip

Change History (11)

#1 @maxcutler
12 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.

#2 @scribu
12 years ago

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

#3 @scribu
12 years ago

Related: #18551

#4 @nprasath002
12 years ago

This patch fixes that. Modified the return data

#5 follow-up: @jasongel
11 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.

#6 in reply to: ↑ 5 ; follow-up: @maxcutler
11 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.

#7 in reply to: ↑ 6 @jasongel
11 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.

#8 @maxcutler
11 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.

#9 @nacin
11 years ago

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