WordPress.org

Plugin Directory

Changeset 581486


Ignore:
Timestamp:
08/03/12 19:57:53 (21 months ago)
Author:
betzster
Message:

Admins should be whitelisted based on username, not user ID, like we have on WordPress.com

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bulk-user-management/trunk/bulk-user-management.php

    r573631 r581486  
    343343            return true; 
    344344 
    345         $admins = array_map( 'intval', apply_filters( 'bulk_user_management_admin_users', array() ) ); 
    346         if ( in_array( get_current_user_id(), $admins ) ) 
     345        $admins = array_map( 'sanitize_user', apply_filters( 'bulk_user_management_admin_users', array() ) );  
     346        if ( in_array( wp_get_current_user()->user_login, $admins ) )  
    347347            return true; 
    348348 
Note: See TracChangeset for help on using the changeset viewer.