Make WordPress Core

Opened 6 years ago

Last modified 9 months ago

#6405 accepted enhancement

When deleting users without any links/posts, don't ask to whom they should be reattributed

Reported by: markjaquith Owned by: rajnikmit
Milestone: Future Release Priority: normal
Severity: normal Version: 2.7
Component: Users Keywords: has-patch needs-refresh
Focuses: Cc:


When deleting a user, it asks to whom their links/posts should be reattributed (or if they should be deleted). We can skip this screen if they don't have any links or posts.

Attachments (3)

users.patch (12.4 KB) - added by rajnikmit 4 years ago.
6405.diff (4.2 KB) - added by wojtek.szkutnik 4 years ago.
users.diff (2.9 KB) - added by benjmay 14 months ago.

Download all attachments as: .zip

Change History (16)

comment:1 mrmist5 years ago

  • Keywords needs-patch added
  • Version changed from 2.5 to 2.7

comment:2 Denis-de-Bernardy5 years ago

  • Component changed from Administration to Users
  • Milestone changed from 2.9 to Future Release

comment:3 rajnikmit4 years ago

  • Owner changed from anonymous to rajnikmit
  • Status changed from new to accepted

rajnikmit4 years ago

comment:4 in reply to: ↑ description rajnikmit4 years ago

  • Keywords has-patch added; needs-patch removed

I added a patch.Please check it and let me know.

comment:5 nacin4 years ago

  • Keywords needs-patch added; has-patch removed

Please create a diff against trunk. That patch removes a significant amount of code that was recently committed, and therefore I have no idea what you changed.

Please review your diffs pre/post upload. It would have been rather obvious to realize that you were suggesting so many changes.

comment:6 wojtek.szkutnik4 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing added; needs-patch removed

The previous one seems a little inefficient, this one should do a better job.

wojtek.szkutnik4 years ago

comment:7 wojtek.szkutnik4 years ago

  • Keywords gsoc added

comment:8 MichaelZed15 months ago

See also ticket #23224 Delete Users: selecting a username should select the “Attribute all posts to” radio button

comment:9 ocean9014 months ago

#23730 was marked as a duplicate.

comment:10 ocean9014 months ago

  • Keywords needs-refresh added; needs-testing gsoc removed

benjmay14 months ago

comment:11 benjmay14 months ago

  • Cc bmay@… added

I put a quick proof of concept together, essentially checking that any of the user(s) about to be deleted have any kind of post, and if they don't, just show a hidden input to run the default delete action on the next step, rather than re-assign.

I also put a check on the jQuery in the header, that if that hidden field exists, it doesn't disable the submit button.

I'm not sure if a text line with words to the effect of "This user has no posts that need to be dealt with" - incase they are expecting those two options.

comment:12 sethshoultes9 months ago

  • Version changed from 2.7 to trunk

I tested the patch, submitted by benjmay, against trunk. I was able to delete a user, that didn't have any posts, without having to attribute (or delete) the non-existent posts to another user. I also tested with a user that had created a post, and was asked to attribute the post created by this user, to another user without issue.

It seems to be working pretty well.

comment:13 ocean909 months ago

  • Version changed from trunk to 2.7

Version field indicates when the enhancement was initially suggested.

Note: See TracTickets for help on using tickets.