Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Admins should be whitelisted based on username, not user ID, like we …

…have on WordPress.com
  • Loading branch information...
commit d8d73a06e06a0ca6aec5f3ae3c1a2b40b8b7f65f 1 parent 5abb15c
@danielbachhuber danielbachhuber authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 bulk-user-management.php
View
4 bulk-user-management.php
@@ -342,8 +342,8 @@ public static function current_user_can_bulk_edit() {
if ( is_super_admin() )
return true;
- $admins = array_map( 'intval', apply_filters( 'bulk_user_management_admin_users', array() ) );
- if ( in_array( get_current_user_id(), $admins ) )
+ $admins = array_map( 'sanitize_user', apply_filters( 'bulk_user_management_admin_users', array() ) );
+ if ( in_array( wp_get_current_user()->user_login, $admins ) )
return true;
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.