Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39220 closed enhancement (fixed)

Remove 1 `is_super_admin()` check in wp-admin/user-new.php

Reported by: supercoder's profile supercoder Owned by: flixos90's profile flixos90
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: has-patch
Focuses: multisite Cc:

Description

This is part of the #37616 task. when adding a network administrator who's already on the site, that user is still invited again

Attachments (2)

39220.patch (697 bytes) - added by supercoder 8 years ago.
39220-2.patch (690 bytes) - added by supercoder 8 years ago.

Download all attachments as: .zip

Change History (7)

@supercoder
8 years ago

#1 @supercoder
8 years ago

  • Keywords has-patch added

#2 follow-up: @flixos90
8 years ago

  • Focuses multisite added
  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to flixos90
  • Status changed from new to reviewing
  • Summary changed from Remove 1 check in wp-admin/user-new.php to Remove 1 `is_super_admin()` check in wp-admin/user-new.php

Hi @supercoder, and thanks for the ticket and patch! :)

Can you maybe have another look at the patch and review "Ticket 11" on https://core.trac.wordpress.org/ticket/37616#comment:26 in detail? In your patch you removed the $username != null check, but instead the !is_super_admin( $user_id ) check should be removed. You could also adjust the spacing in ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) (same line) to follow the WordPress coding standards.

@supercoder
8 years ago

#3 in reply to: ↑ 2 @supercoder
8 years ago

Replying to flixos90:

Hi @supercoder, and thanks for the ticket and patch! :)

Can you maybe have another look at the patch and review "Ticket 11" on https://core.trac.wordpress.org/ticket/37616#comment:26 in detail? In your patch you removed the $username != null check, but instead the !is_super_admin( $user_id ) check should be removed. You could also adjust the spacing in ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) (same line) to follow the WordPress coding standards.

Thanks for the update. I have updated the patch. Please check.

#4 @flixos90
8 years ago

  • Keywords has-patch added; needs-patch removed

Thanks @supercoder, looks good now!

#5 @flixos90
8 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 39946:

Multisite: Remove unnecessary is_super_admin() check when adding an existing user to a site.

Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited.

Props supercoder.
Fixes #39220. See #37616.

Note: See TracTickets for help on using tickets.