Skip to content
Browse files

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

…have on WordPress.com
  • Loading branch information...
1 parent 5abb15c commit d8d73a06e06a0ca6aec5f3ae3c1a2b40b8b7f65f @danielbachhuber danielbachhuber committed Aug 2, 2012
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;

0 comments on commit d8d73a0

Please sign in to comment.
Something went wrong with that request. Please try again.