WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#12711 closed defect (bug) (fixed)

Author & Users shows all users on multisite

Reported by: ocean90 Owned by:
Milestone: 3.0 Priority: high
Severity: normal Version:
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

On a multisite install go to a site backend and then to author&users, you should see all users of the network and not only the users of the current blog.

Also the delete function is broken, I think its because of the bug.

Attachments (4)

12711.patch (681 bytes) - added by ocean90 11 years ago.
12711.2.patch (1.2 KB) - added by ocean90 11 years ago.
12711.3.patch (1.2 KB) - added by ocean90 11 years ago.
removed the third argument
12711.4.patch (739 bytes) - added by ocean90 11 years ago.
fix #12767

Download all attachments as: .zip

Change History (20)

#1 @ocean90
11 years ago

You can test it as super admin or as admin of the current site.

#2 @ryan
11 years ago

For multisite, users deleted from users.php have their role removed from the current blog. We should only list users that have a role on the current blog if is_multisite().

@ocean90
11 years ago

#3 @ryan
11 years ago

Instead instead of being deleted, the *capabilities usermeta field for the user is being set to an empty string. WP_User_Search::prepare_query() fetches all users that have that field, whether it is empty or not.

#4 @miqrogroove
11 years ago

count_users() does the same, as it was based on WP_User_Search.

#5 follow-up: @ryan
11 years ago

remove_user_from_blog() calls WP_User::remove_all_caps() which sets capabilities to an empty string. Maybe we should have it delete.

#6 in reply to: ↑ 5 @andreasnrb
11 years ago

Replying to ryan:

remove_user_from_blog() calls WP_User::remove_all_caps() which sets capabilities to an empty string. Maybe we should have it delete.

I have added a ticket for the hooks thing #12720.

#7 @ocean90
11 years ago

  • Keywords has-patch added

We should delete them, it fixes some other discrepancies on ms-sites.php. Patch added.

@ocean90
11 years ago

#8 @nacin
11 years ago

delete_user_meta() should only take two arguments. The third is for the current meta value, to distinguish between multiple metadata rows of the same key for an item.

@ocean90
11 years ago

removed the third argument

#9 @wpmuguru
11 years ago

(In [13883]) delete user cap in remove_all_caps(), props ocean90, see #12711

#10 @wpmuguru
11 years ago

Before closing this ticket can we verify the last change didn't affect WP single site installs.

#11 @TobiasBg
11 years ago

Apparently it removes all users from being shown: #12767

@ocean90
11 years ago

fix #12767

#12 @ocean90
11 years ago

12711.4.patch should fix that. I tested it on single and ms installation, both works.

#13 @scribu
11 years ago

Confirming that 12711.4.patch fixes #12767.

#14 @automattor
11 years ago

(In [13894]) restore user list display in single site, props ocean90, see #12711, #12767

#15 @wpmuguru
11 years ago

Closing. If an issue is found, someone can reopen.

#16 @wpmuguru
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.