[wp-trac] [WordPress Trac] #16293: In multisite installs, users with id 1 or 2 can't be deleted
WordPress Trac
noreply at wordpress.org
Wed Mar 19 23:06:23 UTC 2014
#16293: In multisite installs, users with id 1 or 2 can't be deleted
------------------------------+------------------------
Reporter: PeteMall | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.9
Component: Users | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: multisite
------------------------------+------------------------
Changes (by jeremyfelt):
* keywords: dev-feedback 3.7-early needs-patch => has-patch commit
Comment:
Looking through and testing
[https://core.trac.wordpress.org/attachment/ticket/16293/16293.4.diff
16293.4.diff] again.
Requirements for deleting a user from the network:
* Current user can `manage_network_users`
* Current user has `delete_user` cap
* User being deleted is not a super admin
* The email of the user being deleted is not currently set as the network
admin email
If these are in order, a user with an ID of 1 can be deleted using bulk
actions. A user with an ID of 1 cannot be deleted using the ''delete'' row
action link even though the ''delete'' row action link appears. There are
no restrictions on a user ID of 2, contrary to the ticket title.
16293.4.diff does the trick as all the existing checks take care of normal
concerns when deleting users from the network.
'''If''' the `manage_network_users` capability is assigned to user ID 1,
they are no longer a super admin, '''and''' the `delete_user` meta
capability is mapped to the user—they can delete themselves from the
network after reassigning content to another user. This is the case with
any user other than ID 1 as well. The experience is actually not that bad
if you're expecting it. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16293#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list