WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12386 closed defect (bug) (fixed)

Clean-up of confirm_delete_users in ms.php

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

Description

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.

todo:

  • 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 4 years ago.
ms_confirm_delete.diff (2.8 KB) - added by ocean90 4 years ago.
(ignore first diff) add require_once('admin-footer.php')
ms_confirm_delete2.diff (3.7 KB) - added by ocean90 4 years ago.
Fixes, show names of the blog owners which makes deletion of more users clearer http://grab.by/2HvV

Download all attachments as: .zip

Change History (11)

ocean904 years ago

ocean904 years ago

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

ocean904 years ago

Fixes, show names of the blog owners which makes deletion of more users clearer http://grab.by/2HvV

comment:1 ocean904 years ago

Summary:

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: http://grab.by/2HvV

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.

comment:2 wpmuguru4 years ago

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

comment:3 wpmuguru4 years ago

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

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

comment:4 ocean904 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Please use ms_confirm_delete2.diff !

ms_confirm_delete1.diff has bugs.

comment:5 wpmuguru4 years ago

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

comment:6 wpmuguru4 years ago

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

If an issue shows up the ticket can be reopened.

comment:7 nacin4 years ago

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

comment:8 nacin4 years ago

Correct ticket for [13983] was #12836.

Note: See TracTickets for help on using tickets.