[wp-trac] [WordPress Trac] #18428: Retrieve a list of user via XML-RPC

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 29 04:08:59 UTC 2012


#18428: Retrieve a list of user  via XML-RPC
-----------------------------+------------------------------
 Reporter:  nprasath002      |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  XML-RPC          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------------------

Comment (by mdawaffe):

 We should be checking
 {{{
 current_user_can( 'edit_user', $user_id )
 }}}

 instead of
 {{{
 current_user_can( 'edit_users' )
 }}}

 where appropriate.  The same goes for {{{delete_user}}}.

 I also think we should be explicitly casting all input:

 {{{
 $username       = (string) $args[1];
 // ...
 $user_data['display_name'] = (string) $content_struct['display_name'];
 }}}

 but that's a general issue with all our XML-RPC methods.

 It's strange that {{{wp.editUser}}} accepts user_contacts input, but
 {{{wp.newUser}}} does not.

 The post endpoints provide post meta get/set.  It'd be cool if the user
 endpoints provided user meta get/set as well.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18428#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list