WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#18426 closed feature request (maybelater)

Delete users via XML-RPC

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

Description

Input can be an array of user id's.
returns array of deleted user id's.
function is atmoic. if one user_id is invalid
no users will be deleted.

Attachments (4)

wp.deleteUser.patch (2.9 KB) - added by nprasath002 8 years ago.
wp.deleteUser.2.patch (1.6 KB) - added by maxcutler 8 years ago.
wp.editUser.patch (143.1 KB) - added by nprasath002 8 years ago.
wp.deleteUser.3.patch (2.8 KB) - added by nprasath002 8 years ago.

Download all attachments as: .zip

Change History (11)

#1 @maxcutler
8 years ago

  • Cc max@… added

Cleaned up the patch and removed the multi-user delete functionality.

nprasath002, could you explain the rationale for the multi-user delete functionality? None of the other XML-RPC methods support that kind of behavior, and neither does WordPress core. While your original patch checks the IDs before it starts deleting things, it is not really atomic because one of the wp_delete_user calls could fail and you wouldn't be able to rollback the already deleted users.

If there's a good reason I'd be willing to reinstate the multi-user delete, but for now I think it makes more sense to be consistent with all of the other methods.

#2 @nprasath002
8 years ago

I agree.
I thought supporting bulk delete would decrease server load and data transfer

#3 @nprasath002
8 years ago

  • Version set to 3.3

I made some modifications to the patch

  • Modified the return value as to return an error string when deleting a user is unsuccessful
  • added support for reassigning asset of the user for another user

#4 @nprasath002
8 years ago

sorry wp.editUser is a wrong patch

#5 @nacin
8 years ago

Core does support bulk-deletion of users via Bulk Actions, but it also introduces an interstitial (reassignment of posts) and a confirmation. I don't see "bulk deletion" of users to be a particularly important enhancement to XML-RPC.

#6 @westi
8 years ago

  • Priority changed from normal to low

I'm not sure that user management in general is an important enhancement for XML-RPC.

#7 @nacin
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Per IRC discussion (see #18428), this isn't going to be part of XML-RPC for the time being.

Note: See TracTickets for help on using tickets.