WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#38171 new feature request

A site within a network has no more users when those users are deleted from the network

Reported by: Fab1en Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: needs-patch ux-feedback 2nd-opinion
Focuses: multisite Cc:

Description

In a multisite installation, if a site has only one user and you delete this user, the site has no more users.

That seams logical, but this is not what super admin expects when he deletes a user from the network. When deleting a user, the following question appears :

What should be done with content owned by XXX ?

But even if he chooses "Attribute all content to:" option, the site in question is left without any user. I don't think this is impacting the site functions, but perhaps we should add a note ?

We have several options :

  • if a user is selected to attribute the content to, it should also be added as a site user
  • OR, display a warning somewhere that a site will be left without any user before deleting the user
  • OR, do nothing and be responsible of some heart attacks when a super admin discovers that a site has no more active user.

Change History (10)

#1 follow-up: @danhgilmore
2 years ago

I'm not sure why there would be heartburn over the fact that a site doesn't have any users. A Super Admin can add a user at a later date if need be.

Full disclosure: I run a huge WPMS installation and there are a number of sites with no owner/admin.

#2 in reply to: ↑ 1 @Mista-Flo
2 years ago

Replying to danhgilmore:

I'm not sure why there would be heartburn over the fact that a site doesn't have any users. A Super Admin can add a user at a later date if need be.

Full disclosure: I run a huge WPMS installation and there are a number of sites with no owner/admin.

That's true, but, if you give the content of a site without user to an existing user (of another blog), in my opinion, it makes sense to add the user to this site no ?

We can do this easily in code but we are forced to add a role to the user, so the main difficult point in my opinion is to know which role do we need to set to this user.

I guest the best option is during the form where you ask if you want to give content to a user, we will detect if the selected user which will receive content is part of the blog, if yes, then ask the admin to select a role to chose for this user.

But maybe it's a lot of complication for a little issue.

Last edited 2 years ago by Mista-Flo (previous) (diff)

#3 follow-up: @johnbillion
2 years ago

  • Keywords needs-patch ux-feedback 2nd-opinion added
  • Type changed from defect (bug) to feature request
  • Version changed from 4.5.3 to 3.0

There's nothing wrong with a site that does not have any users, even if it has content that is assigned to a user that is not a member of the site.

I'd be happy to see proposals for a UI that presents a message to the user when removing the last user of a site, or presents them with the option of automatically adding the re-assigned user to the site.

#4 follow-up: @Mista-Flo
2 years ago

I tested to delete all users from a blog, I found an issue according to me, it's not normal that the network administrator can't see anymore in the admin bar menu (My sites tab) the blog with no user. I guess it's not an expected behavior since the network administrator can still see the site in the wp-admin/network/sites.php admin page.

Do we have to handle this, if so maybe open a new ticket ?

#5 in reply to: ↑ 4 @Fab1en
2 years ago

Replying to Mista-Flo:

I guess it's not an expected behavior

The site listed in "My sites tab" of the admin menu bar are the sites you are belonging to. If you just remove yourself from a site, you will see it disappear from the menu, but still have access to it via Network admin > Sites menu. This behavior is OK for me : sites you do not belong to are not listed here, like for other non-superadmin users.

Last edited 2 years ago by Fab1en (previous) (diff)

#6 in reply to: ↑ 3 @Fab1en
2 years ago

Replying to johnbillion:

There's nothing wrong with a site that does not have any users, even if it has content that is assigned to a user that is not a member of the site.

Thanks for your message @johnbillion. In my opinion, there is nothing wrong, but it's just counter-intuitive. How could we make that more intuitive ?

I'd be happy to see proposals for a UI that presents a message to the user when removing the last user of a site, or presents them with the option of automatically adding the re-assigned user to the site.

In my opinion, we have several possibilities here :

  1. before deleting a user, propose to assign another user to a site that will be left without any user otherwise,
  2. or once the previous user has been deleted, when a site edit page is displayed, show a message to explain how to and why add a user to a site that has no more user.

The first proposal may be difficult to detect : before deleting users, we have to find if a site will be left without any user or not. For a site that has users A and B, deleting A would not display the message, deleting B either, but deleting A and B in a bulk action will.

The second proposal would be easier to implement and would also cover other cases. For example, when you explicitly remove a user from a site without deleting it.

#7 @Mista-Flo
2 years ago

Hi,

For the case A, In my opinion, we're not forced to check if there is no user in this blog, we can just check if the user that we choose to receive content from this blog is a member of this blog or not. But maybe we have to check if there is no user in the blog if the admin don't choose any user to receive the content of the blog.

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


16 months ago

#9 @melchoyce
16 months ago

Adding some sort of message upon deletion seems sensible, maybe along the lines of:

Head's up! If you delete [user], this site will be left without any users. What should be done with content owned by this user?

O Delete all content
O Attribute all content to: [Dropdown of all multisite users?]
O Attribute to a new user
If selected: [Input to add new username] [Input to add email]

[Confirm Deletion] Cancel

This ticket was mentioned in Slack in #design by boemedia. View the logs.


5 months ago

Note: See TracTickets for help on using tickets.