Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#12386 closed defect (bug) (fixed)

Clean-up of confirm_delete_users in ms.php

Reported by: ocean90's profile ocean90 Owned by: wpmuguru's profile wpmuguru
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Multisite Keywords: users, delete, has-patch
Focuses: Cc:


I make some changes for the confirm_delete_users function in ms.php.

I add a new check, so that users which should be delete, didn't display in the select box.


  • don't use the fix admin ? ($out = '<option value="1">admin</option>)
  • title is only < *Name* - WordPress, should be Users < *Name* - WordPress too
  • page stops loading, footer is missing

Attachments (3)

ms.php.diff (2.3 KB) - added by ocean90 14 years ago.
ms_confirm_delete.diff (2.8 KB) - added by ocean90 14 years ago.
(ignore first diff) add require_once('admin-footer.php')
ms_confirm_delete2.diff (3.7 KB) - added by ocean90 14 years ago.
Fixes, show names of the blog owners which makes deletion of more users clearer

Download all attachments as: .zip

Change History (11)

14 years ago

14 years ago

(ignore first diff) add require_once('admin-footer.php')

14 years ago

Fixes, show names of the blog owners which makes deletion of more users clearer

#1 @ocean90
14 years ago


Go to Network-Users and check a user and click delete. Now you must transfer the posts.
On that page the footer doesn't load because of the missing require_once('admin-footer.php'), also the page title, headline and icon is missing.
Its fixed on ms_confirm_delete2.diff.

Now go to network-users and check two users and click delete, for example user1 and user2.
Now you can transfer the post from user1 for example to user3 and also to user2. But that makes no sense, because you want to delete user2 also.
The same is with user2, in the select menu you can choose user1 too, but you want to delete user1.
Its fixed on ms_confirm_delete2.diff.

On ms_confirm_delete2.diff I add also a little feature. If you choose more users for deletion and one user have more blogs you losing the overview and don't know which blog is from which user. Now it shows the username and then the blogs, see this image:

And now I found another bug:
Create a new user (user1), make it to side admin and remove the user admin from the side admin list. Now create a blog with the email of user1.
Now got to network-users and delete user1. You can only choose admin for transfer posts because there is no other user on this blog. Click the button and now all posts from user1 are delete(they are in trash with no author).
So we should remove the line $out = '<option value="1">admin</option> and show instead a message, that the user can't be delete.

#2 @wpmuguru
14 years ago

  • Owner set to wpmuguru
  • Status changed from new to assigned

#3 @wpmuguru
14 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13504]) cleanup confirm delete users, props ocean90, fixes #12386

#4 @ocean90
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Please use ms_confirm_delete2.diff !

ms_confirm_delete1.diff has bugs.

#5 @wpmuguru
14 years ago

(In [13506]) more ms delete user tweaks, props ocean90, see #12386

#6 @wpmuguru
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

If an issue shows up the ticket can be reopened.

#7 @nacin
14 years ago

(In [13983]) Cast subject of _deep_replace() to string to prevent an infinite loop. props mdawaffe, fixes #12386

#8 @nacin
14 years ago

Correct ticket for [13983] was #12836.

Note: See TracTickets for help on using tickets.