WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#20792 closed defect (bug) (fixed)

Is not possible delete users in WordPress 3.4 Multisite

Reported by: j.conti Owned by: duck_
Milestone: 3.4 Priority: normal
Severity: blocker Version: 3.4
Component: Network Admin Keywords: has-patch
Focuses: multisite Cc:

Description

Hi,

Is not possible delete user in WordPress Multisite. (/network/users.php).

Steps;

  • Add a New user.
  • After that, try to delete in /network/users.php

I

Attachments (1)

20792.diff (434 bytes) - added by duck_ 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @j.conti3 years ago

  • Severity changed from blocker to critical

comment:2 @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.4

Confirmed. The message says "User deleted", but the user is still there.

comment:3 @nacin3 years ago

  • Severity changed from critical to blocker

Also confirmed.

@duck_3 years ago

comment:4 @duck_3 years ago

Attached a patch. [20581] removed the wrong query. It left the usermeta deletion and removed the deletion from the main users table.

comment:5 @SergeyBiryukov3 years ago

  • Keywords has-patch added

20792.diff works.

comment:6 @nacin3 years ago

(In [UT728]) Update MS tests.

  • Ensure the is_user_member_of_blog() test runs.
  • Assert that after deletion, the user no longer exists. see #20792
  • Update expected return value for get_blogs_of_user() to always be an array. see #19500
  • Two failures on the exists() checks, without the patch on #20792

comment:7 @duck_3 years ago

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In [20952]:

wpmu_delete_user() should actually delete the user. Fixes #20792.

User meta is removed by delete_metadata_by_mid() already.

Note: See TracTickets for help on using tickets.