[wp-trac] [WordPress Trac] #39158: Unify site deactivation process

WordPress Trac noreply at wordpress.org
Wed Dec 7 19:20:39 UTC 2016


#39158: Unify site deactivation process
--------------------------------+-----------------
 Reporter:  flixos90            |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  4.8
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------
 Currently there are three cases of "deleting" a site on a multisite setup:

 * deleting a site entirely (for example via Sites list table's "Delete"
 link)
 * deactivating a site from the network admin (for example via Sites list
 table's "Deactivate" link)
 * deactivating a site from the site admin (admin can click "Delete Site"
 in Tools menu)

 Note that deactivating a site does not wipe out the site, but rather sets
 the "Deleted" flag for that site (strange legacy naming, can be ignored
 here).

 What this ticket should solve is that the latter two processes work
 differently although they should be doing the same thing: While
 deactivating a site from the network admin simply sets the site to
 "Deleted", deactivating the current site from the site admin also removes
 all users from the site (via `wpmu_delete_blog()`). That means if an admin
 deactivates their site and later asks support (i.e. the network
 administrator) to restore it, all users will be gone.
 I'm not sure why this happens, but I certainly don't think the two actions
 should have a different behavior. My proposal is to move the part of that
 function where users are removed into the `if ( $drop )` clause to make
 sure users are only removed when the site is actually being deleted.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39158>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list