[wp-hackers] XMLRPC (wp.editComment) does not allow change of user_id

Andrew Nacin wp at andrewnacin.com
Wed Nov 16 05:09:44 UTC 2011


On Sun, Nov 13, 2011 at 12:01 AM, Ryan Chan <ryanchan404 at gmail.com> wrote:

> Hello,
>
> I can create a comment using the "wp.newComment" and then change the
> author/author_url using "wp.editComment".
>
> In the database, the values of comment_author, comment_author_email,
> comment_author_url are all changed. But the user_id is still 1.
>
> Anyway to change this user_id? In particularly I want to change it to
> user id representing anonymous users.


You can allow anonymous comments using wp.newComment using the
xmlrpc_allow_anonymous_comments filter. wp.editComment does not currently
support the editing of user_id. Check out the source at
wp-includes/class-wp-xmlrpc-server.php.

You may want to direct XML-RPC questions to that list in the future:
http://lists.automattic.com/mailman/listinfo/wp-xmlrpc.

Nacin


More information about the wp-hackers mailing list